﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataSetTest" targetNamespace="http://tempuri.org/DataSetTest.xsd" xmlns:mstns="http://tempuri.org/DataSetTest.xsd" xmlns="http://tempuri.org/DataSetTest.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="M1ConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="M1ConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ConsoleAppTest.Properties.Settings.GlobalReference.Default.M1ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="FACT_FACTURASTableAdapter" GeneratorDataComponentClassName="FACT_FACTURASTableAdapter" Name="FACT_FACTURAS" UserDataComponentName="FACT_FACTURASTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="M1ConnectionString (Settings)" DbObjectName="MedicineOneTC18.dbo.FACT_FACTURAS" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorSourceName="Fill" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [FACT_FACTURAS] WHERE (([Pk] = @Original_Pk) AND ([M1SysRowVersion] = @Original_M1SysRowVersion))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Original_Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Binary" Direction="Input" ParameterName="@Original_M1SysRowVersion" Precision="0" ProviderType="Timestamp" Scale="0" Size="0" SourceColumn="M1SysRowVersion" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [FACT_FACTURAS] ([Pk], [Pk_organizacao_emissora], [Numero], [Pk_serie_facturacao], [Data], [Morada], [Num_contribuinte], [Pk_entidade], [Nome_entidade], [Morada_entidade], [Num_contribuinte_entidade], [Paga], [Modo_pagamento], [Num_cheque], [Pk_utente], [Nome_utente], [Recibo_emitido], [Num_recibo], [Tipo_documento], [Anulada], [pendente], [Valor_total], [Valor_pago], [Utilizador_ins], [pk_documento], [Num_beneficiario_utente], [Nome_sistema_saude], [Pk_unidade_organica_utilizador_emissor], [Modo_pagamento_parcial], [Total_notas_credito], [Documento_encerrado], [Documento_integrado], [Observacoes], [Pk_template_documento], [Pk_plano_saude_utente], [Data_integracao_sistema_externo], [Nome_alternativo], [Morada_alternativa], [Num_contribuinte_alternativo], [Num_prestacoes_para_pagamento], [Factura_singular], [Pk_entidade_utente], [Hash], [Hash_control], [Pk_nota_devolucao], [Valor_total_text], [Valor_pago_text], [Total_notas_credito_text], [Pk_moeda], [Factura_lotes], [NumeroUnico]) VALUES (@Pk, @Pk_organizacao_emissora, @Numero, @Pk_serie_facturacao, @Data, @Morada, @Num_contribuinte, @Pk_entidade, @Nome_entidade, @Morada_entidade, @Num_contribuinte_entidade, @Paga, @Modo_pagamento, @Num_cheque, @Pk_utente, @Nome_utente, @Recibo_emitido, @Num_recibo, @Tipo_documento, @Anulada, @pendente, @Valor_total, @Valor_pago, @Utilizador_ins, @pk_documento, @Num_beneficiario_utente, @Nome_sistema_saude, @Pk_unidade_organica_utilizador_emissor, @Modo_pagamento_parcial, @Total_notas_credito, @Documento_encerrado, @Documento_integrado, @Observacoes, @Pk_template_documento, @Pk_plano_saude_utente, @Data_integracao_sistema_externo, @Nome_alternativo, @Morada_alternativa, @Num_contribuinte_alternativo, @Num_prestacoes_para_pagamento, @Factura_singular, @Pk_entidade_utente, @Hash, @Hash_control, @Pk_nota_devolucao, @Valor_total_text, @Valor_pago_text, @Total_notas_credito_text, @Pk_moeda, @Factura_lotes, @NumeroUnico)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_organizacao_emissora" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_organizacao_emissora" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Numero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Numero" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_serie_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_serie_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Morada" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Morada" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_contribuinte" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_contribuinte" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Pk_entidade" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="Pk_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_entidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Morada_entidade" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Morada_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_contribuinte_entidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_contribuinte_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Paga" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Paga" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Modo_pagamento" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Modo_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_cheque" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_cheque" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Recibo_emitido" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Recibo_emitido" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_recibo" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_recibo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Tipo_documento" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Tipo_documento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Anulada" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Anulada" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@pendente" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="pendente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_total" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor_total" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_pago" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor_pago" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Utilizador_ins" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Utilizador_ins" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_documento" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_documento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_beneficiario_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_beneficiario_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_sistema_saude" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_sistema_saude" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_unidade_organica_utilizador_emissor" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_unidade_organica_utilizador_emissor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Modo_pagamento_parcial" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Modo_pagamento_parcial" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_notas_credito" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_notas_credito" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Documento_encerrado" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Documento_encerrado" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Documento_integrado" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Documento_integrado" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Observacoes" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Observacoes" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_template_documento" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_template_documento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_plano_saude_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_plano_saude_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_integracao_sistema_externo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_integracao_sistema_externo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_alternativo" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_alternativo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Morada_alternativa" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Morada_alternativa" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_contribuinte_alternativo" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_contribuinte_alternativo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Num_prestacoes_para_pagamento" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Num_prestacoes_para_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Factura_singular" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Factura_singular" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Pk_entidade_utente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Pk_entidade_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Hash" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Hash" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Hash_control" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Hash_control" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_nota_devolucao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_nota_devolucao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_total_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_total_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_pago_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_pago_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_notas_credito_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_notas_credito_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_moeda" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_moeda" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Factura_lotes" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Factura_lotes" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@NumeroUnico" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NumeroUnico" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        FACT_FACTURAS.*
FROM            FACT_FACTURAS</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [FACT_FACTURAS] SET [Pk] = @Pk, [Pk_organizacao_emissora] = @Pk_organizacao_emissora, [Numero] = @Numero, [Pk_serie_facturacao] = @Pk_serie_facturacao, [Data] = @Data, [Morada] = @Morada, [Num_contribuinte] = @Num_contribuinte, [Pk_entidade] = @Pk_entidade, [Nome_entidade] = @Nome_entidade, [Morada_entidade] = @Morada_entidade, [Num_contribuinte_entidade] = @Num_contribuinte_entidade, [Paga] = @Paga, [Modo_pagamento] = @Modo_pagamento, [Num_cheque] = @Num_cheque, [Pk_utente] = @Pk_utente, [Nome_utente] = @Nome_utente, [Recibo_emitido] = @Recibo_emitido, [Num_recibo] = @Num_recibo, [Tipo_documento] = @Tipo_documento, [Anulada] = @Anulada, [pendente] = @pendente, [Valor_total] = @Valor_total, [Valor_pago] = @Valor_pago, [Utilizador_ins] = @Utilizador_ins, [pk_documento] = @pk_documento, [Num_beneficiario_utente] = @Num_beneficiario_utente, [Nome_sistema_saude] = @Nome_sistema_saude, [Pk_unidade_organica_utilizador_emissor] = @Pk_unidade_organica_utilizador_emissor, [Modo_pagamento_parcial] = @Modo_pagamento_parcial, [Total_notas_credito] = @Total_notas_credito, [Documento_encerrado] = @Documento_encerrado, [Documento_integrado] = @Documento_integrado, [Observacoes] = @Observacoes, [Pk_template_documento] = @Pk_template_documento, [Pk_plano_saude_utente] = @Pk_plano_saude_utente, [Data_integracao_sistema_externo] = @Data_integracao_sistema_externo, [Nome_alternativo] = @Nome_alternativo, [Morada_alternativa] = @Morada_alternativa, [Num_contribuinte_alternativo] = @Num_contribuinte_alternativo, [Num_prestacoes_para_pagamento] = @Num_prestacoes_para_pagamento, [Factura_singular] = @Factura_singular, [Pk_entidade_utente] = @Pk_entidade_utente, [Hash] = @Hash, [Hash_control] = @Hash_control, [Pk_nota_devolucao] = @Pk_nota_devolucao, [Valor_total_text] = @Valor_total_text, [Valor_pago_text] = @Valor_pago_text, [Total_notas_credito_text] = @Total_notas_credito_text, [Pk_moeda] = @Pk_moeda, [Factura_lotes] = @Factura_lotes, [NumeroUnico] = @NumeroUnico WHERE (([Pk] = @Original_Pk) AND ([M1SysRowVersion] = @Original_M1SysRowVersion))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_organizacao_emissora" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_organizacao_emissora" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Numero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Numero" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_serie_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_serie_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Morada" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Morada" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_contribuinte" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_contribuinte" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Pk_entidade" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="Pk_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_entidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Morada_entidade" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Morada_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_contribuinte_entidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_contribuinte_entidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Paga" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Paga" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Modo_pagamento" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Modo_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_cheque" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_cheque" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Recibo_emitido" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Recibo_emitido" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_recibo" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_recibo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Tipo_documento" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Tipo_documento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Anulada" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Anulada" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@pendente" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="pendente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_total" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor_total" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_pago" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor_pago" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Utilizador_ins" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Utilizador_ins" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_documento" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_documento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_beneficiario_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_beneficiario_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_sistema_saude" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_sistema_saude" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_unidade_organica_utilizador_emissor" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_unidade_organica_utilizador_emissor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Modo_pagamento_parcial" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Modo_pagamento_parcial" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_notas_credito" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_notas_credito" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Documento_encerrado" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Documento_encerrado" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Documento_integrado" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Documento_integrado" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Observacoes" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Observacoes" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_template_documento" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_template_documento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_plano_saude_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_plano_saude_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_integracao_sistema_externo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_integracao_sistema_externo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_alternativo" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome_alternativo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Morada_alternativa" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Morada_alternativa" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_contribuinte_alternativo" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_contribuinte_alternativo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Num_prestacoes_para_pagamento" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Num_prestacoes_para_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Factura_singular" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Factura_singular" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Pk_entidade_utente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Pk_entidade_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Hash" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Hash" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Hash_control" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Hash_control" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_nota_devolucao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_nota_devolucao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_total_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_total_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_pago_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_pago_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_notas_credito_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_notas_credito_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_moeda" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_moeda" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Factura_lotes" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Factura_lotes" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@NumeroUnico" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NumeroUnico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Original_Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Binary" Direction="Input" ParameterName="@Original_M1SysRowVersion" Precision="0" ProviderType="Timestamp" Scale="0" Size="0" SourceColumn="M1SysRowVersion" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Pk" DataSetColumn="Pk" />
              <Mapping SourceColumn="Pk_organizacao_emissora" DataSetColumn="Pk_organizacao_emissora" />
              <Mapping SourceColumn="Numero" DataSetColumn="Numero" />
              <Mapping SourceColumn="Pk_serie_facturacao" DataSetColumn="Pk_serie_facturacao" />
              <Mapping SourceColumn="Data" DataSetColumn="Data" />
              <Mapping SourceColumn="Morada" DataSetColumn="Morada" />
              <Mapping SourceColumn="Num_contribuinte" DataSetColumn="Num_contribuinte" />
              <Mapping SourceColumn="Pk_entidade" DataSetColumn="Pk_entidade" />
              <Mapping SourceColumn="Nome_entidade" DataSetColumn="Nome_entidade" />
              <Mapping SourceColumn="Morada_entidade" DataSetColumn="Morada_entidade" />
              <Mapping SourceColumn="Num_contribuinte_entidade" DataSetColumn="Num_contribuinte_entidade" />
              <Mapping SourceColumn="Paga" DataSetColumn="Paga" />
              <Mapping SourceColumn="Modo_pagamento" DataSetColumn="Modo_pagamento" />
              <Mapping SourceColumn="Num_cheque" DataSetColumn="Num_cheque" />
              <Mapping SourceColumn="Pk_utente" DataSetColumn="Pk_utente" />
              <Mapping SourceColumn="Nome_utente" DataSetColumn="Nome_utente" />
              <Mapping SourceColumn="Recibo_emitido" DataSetColumn="Recibo_emitido" />
              <Mapping SourceColumn="Num_recibo" DataSetColumn="Num_recibo" />
              <Mapping SourceColumn="Tipo_documento" DataSetColumn="Tipo_documento" />
              <Mapping SourceColumn="Anulada" DataSetColumn="Anulada" />
              <Mapping SourceColumn="pendente" DataSetColumn="pendente" />
              <Mapping SourceColumn="Valor_total" DataSetColumn="Valor_total" />
              <Mapping SourceColumn="Valor_pago" DataSetColumn="Valor_pago" />
              <Mapping SourceColumn="Utilizador_ins" DataSetColumn="Utilizador_ins" />
              <Mapping SourceColumn="pk_documento" DataSetColumn="pk_documento" />
              <Mapping SourceColumn="Num_beneficiario_utente" DataSetColumn="Num_beneficiario_utente" />
              <Mapping SourceColumn="Nome_sistema_saude" DataSetColumn="Nome_sistema_saude" />
              <Mapping SourceColumn="Pk_unidade_organica_utilizador_emissor" DataSetColumn="Pk_unidade_organica_utilizador_emissor" />
              <Mapping SourceColumn="Modo_pagamento_parcial" DataSetColumn="Modo_pagamento_parcial" />
              <Mapping SourceColumn="Total_notas_credito" DataSetColumn="Total_notas_credito" />
              <Mapping SourceColumn="Documento_encerrado" DataSetColumn="Documento_encerrado" />
              <Mapping SourceColumn="Documento_integrado" DataSetColumn="Documento_integrado" />
              <Mapping SourceColumn="Observacoes" DataSetColumn="Observacoes" />
              <Mapping SourceColumn="Pk_template_documento" DataSetColumn="Pk_template_documento" />
              <Mapping SourceColumn="Pk_plano_saude_utente" DataSetColumn="Pk_plano_saude_utente" />
              <Mapping SourceColumn="Data_integracao_sistema_externo" DataSetColumn="Data_integracao_sistema_externo" />
              <Mapping SourceColumn="Nome_alternativo" DataSetColumn="Nome_alternativo" />
              <Mapping SourceColumn="Morada_alternativa" DataSetColumn="Morada_alternativa" />
              <Mapping SourceColumn="Num_contribuinte_alternativo" DataSetColumn="Num_contribuinte_alternativo" />
              <Mapping SourceColumn="Num_prestacoes_para_pagamento" DataSetColumn="Num_prestacoes_para_pagamento" />
              <Mapping SourceColumn="Factura_singular" DataSetColumn="Factura_singular" />
              <Mapping SourceColumn="Pk_entidade_utente" DataSetColumn="Pk_entidade_utente" />
              <Mapping SourceColumn="Hash" DataSetColumn="Hash" />
              <Mapping SourceColumn="Hash_control" DataSetColumn="Hash_control" />
              <Mapping SourceColumn="Pk_nota_devolucao" DataSetColumn="Pk_nota_devolucao" />
              <Mapping SourceColumn="Valor_total_text" DataSetColumn="Valor_total_text" />
              <Mapping SourceColumn="Valor_pago_text" DataSetColumn="Valor_pago_text" />
              <Mapping SourceColumn="Total_notas_credito_text" DataSetColumn="Total_notas_credito_text" />
              <Mapping SourceColumn="Pk_moeda" DataSetColumn="Pk_moeda" />
              <Mapping SourceColumn="Factura_lotes" DataSetColumn="Factura_lotes" />
              <Mapping SourceColumn="NumeroUnico" DataSetColumn="NumeroUnico" />
              <Mapping SourceColumn="M1SysRowVersion" DataSetColumn="M1SysRowVersion" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="M1ConnectionString (Settings)" DbObjectName="MedicineOneTC18.dbo.FACT_FACTURAS" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByPk" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByPk" GeneratorSourceName="FillByPk" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="FillByPk">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT *
FROM            FACT_FACTURAS
where Pk = @PkFactura</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="PkFactura" ColumnName="Pk" DataSourceName="MedicineOneTC18.dbo.FACT_FACTURAS" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@PkFactura" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="FACT_DETALHE_FACTURASTableAdapter" GeneratorDataComponentClassName="FACT_DETALHE_FACTURASTableAdapter" Name="FACT_DETALHE_FACTURAS" UserDataComponentName="FACT_DETALHE_FACTURASTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="M1ConnectionString (Settings)" DbObjectName="MedicineOneTC18.dbo.FACT_DETALHE_FACTURAS" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorSourceName="Fill" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [FACT_DETALHE_FACTURAS] WHERE (([Pk] = @Original_Pk) AND ((@IsNull_RowVersion = 1 AND [RowVersion] IS NULL) OR ([RowVersion] = @Original_RowVersion)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Original_Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_RowVersion" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="RowVersion" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Binary" Direction="Input" ParameterName="@Original_RowVersion" Precision="0" ProviderType="Timestamp" Scale="0" Size="0" SourceColumn="RowVersion" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [FACT_DETALHE_FACTURAS] ([Pk], [Pk_factura], [Quantidade], [Pk_acto_clinico], [codigo_acto_clinico], [Nome_acto_clinico], [Valor], [Percentagem_iva], [Percentagem_desconto], [Total_K], [Total_moeda], [Pk_executante], [Pk_Centro_custos], [pk_utente], [np_utente], [nome_utente], [Pk_acto_clinico_utente], [Num_beneficiario], [Pago], [Num_documento_pagamento], [pk_detalhe_factura_dependente], [Data], [Pk_consumo], [Pk_produto], [Agrupado_por_rubrica], [Pk_acto_clinico_para_facturacao], [Pk_armazem], [Pk_recibo], [Ignorar], [Valor_iva], [Preco_final_inclui_iva], [Pk_detalhe_pai], [Percentagem_valor_no_total_detalhe], [Transaccao], [Pk_plano_saude], [Numero_cliente], [Codigo_contabilidade], [Data_integracao_sistema_externo], [Pk_acto_composto], [Pk_marcacao_multipla], [Num_extracto], [Pk_local_realizacao], [Data_ins], [Pk_consumo_para_facturacao], [Pk_detalhe_facturacao_adicional], [Acto_facturacao_adicional], [Pk_iva], [Valor_text], [Total_K_text], [Total_moeda_text], [Percentagem_valor_no_total_detalhe_text], [Valor_inclui_iva_usa_definicao_instalacao], [Valor_Precos_actos_produtos_incluem_iva]) VALUES (@Pk, @Pk_factura, @Quantidade, @Pk_acto_clinico, @codigo_acto_clinico, @Nome_acto_clinico, @Valor, @Percentagem_iva, @Percentagem_desconto, @Total_K, @Total_moeda, @Pk_executante, @Pk_Centro_custos, @pk_utente, @np_utente, @nome_utente, @Pk_acto_clinico_utente, @Num_beneficiario, @Pago, @Num_documento_pagamento, @pk_detalhe_factura_dependente, @Data, @Pk_consumo, @Pk_produto, @Agrupado_por_rubrica, @Pk_acto_clinico_para_facturacao, @Pk_armazem, @Pk_recibo, @Ignorar, @Valor_iva, @Preco_final_inclui_iva, @Pk_detalhe_pai, @Percentagem_valor_no_total_detalhe, @Transaccao, @Pk_plano_saude, @Numero_cliente, @Codigo_contabilidade, @Data_integracao_sistema_externo, @Pk_acto_composto, @Pk_marcacao_multipla, @Num_extracto, @Pk_local_realizacao, @Data_ins, @Pk_consumo_para_facturacao, @Pk_detalhe_facturacao_adicional, @Acto_facturacao_adicional, @Pk_iva, @Valor_text, @Total_K_text, @Total_moeda_text, @Percentagem_valor_no_total_detalhe_text, @Valor_inclui_iva_usa_definicao_instalacao, @Valor_Precos_actos_produtos_incluem_iva)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_factura" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_factura" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Quantidade" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Quantidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@codigo_acto_clinico" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="codigo_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_acto_clinico" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Nome_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Percentagem_iva" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Percentagem_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Percentagem_desconto" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Percentagem_desconto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_K" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_K" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_moeda" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_moeda" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_executante" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_executante" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_Centro_custos" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_Centro_custos" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@np_utente" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="np_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@nome_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="nome_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_beneficiario" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_beneficiario" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Pago" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Pago" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_documento_pagamento" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_documento_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_detalhe_factura_dependente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_detalhe_factura_dependente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_consumo" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_consumo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_produto" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_produto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Agrupado_por_rubrica" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Agrupado_por_rubrica" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico_para_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico_para_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_armazem" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_armazem" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_recibo" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_recibo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Ignorar" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Ignorar" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_iva" Precision="18" ProviderType="Decimal" Scale="10" Size="0" SourceColumn="Valor_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Preco_final_inclui_iva" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Preco_final_inclui_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_detalhe_pai" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_detalhe_pai" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Percentagem_valor_no_total_detalhe" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Percentagem_valor_no_total_detalhe" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Transaccao" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Transaccao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_plano_saude" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_plano_saude" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Numero_cliente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Numero_cliente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Codigo_contabilidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Codigo_contabilidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_integracao_sistema_externo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_integracao_sistema_externo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_composto" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_composto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_marcacao_multipla" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_marcacao_multipla" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_extracto" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_extracto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_local_realizacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_local_realizacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_ins" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_ins" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_consumo_para_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_consumo_para_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_detalhe_facturacao_adicional" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_detalhe_facturacao_adicional" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Acto_facturacao_adicional" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Acto_facturacao_adicional" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Pk_iva" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Pk_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_K_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_K_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_moeda_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_moeda_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Percentagem_valor_no_total_detalhe_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Percentagem_valor_no_total_detalhe_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_inclui_iva_usa_definicao_instalacao" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_inclui_iva_usa_definicao_instalacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_Precos_actos_produtos_incluem_iva" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_Precos_actos_produtos_incluem_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        FACT_DETALHE_FACTURAS.*
FROM            FACT_DETALHE_FACTURAS</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [FACT_DETALHE_FACTURAS] SET [Pk] = @Pk, [Pk_factura] = @Pk_factura, [Quantidade] = @Quantidade, [Pk_acto_clinico] = @Pk_acto_clinico, [codigo_acto_clinico] = @codigo_acto_clinico, [Nome_acto_clinico] = @Nome_acto_clinico, [Valor] = @Valor, [Percentagem_iva] = @Percentagem_iva, [Percentagem_desconto] = @Percentagem_desconto, [Total_K] = @Total_K, [Total_moeda] = @Total_moeda, [Pk_executante] = @Pk_executante, [Pk_Centro_custos] = @Pk_Centro_custos, [pk_utente] = @pk_utente, [np_utente] = @np_utente, [nome_utente] = @nome_utente, [Pk_acto_clinico_utente] = @Pk_acto_clinico_utente, [Num_beneficiario] = @Num_beneficiario, [Pago] = @Pago, [Num_documento_pagamento] = @Num_documento_pagamento, [pk_detalhe_factura_dependente] = @pk_detalhe_factura_dependente, [Data] = @Data, [Pk_consumo] = @Pk_consumo, [Pk_produto] = @Pk_produto, [Agrupado_por_rubrica] = @Agrupado_por_rubrica, [Pk_acto_clinico_para_facturacao] = @Pk_acto_clinico_para_facturacao, [Pk_armazem] = @Pk_armazem, [Pk_recibo] = @Pk_recibo, [Ignorar] = @Ignorar, [Valor_iva] = @Valor_iva, [Preco_final_inclui_iva] = @Preco_final_inclui_iva, [Pk_detalhe_pai] = @Pk_detalhe_pai, [Percentagem_valor_no_total_detalhe] = @Percentagem_valor_no_total_detalhe, [Transaccao] = @Transaccao, [Pk_plano_saude] = @Pk_plano_saude, [Numero_cliente] = @Numero_cliente, [Codigo_contabilidade] = @Codigo_contabilidade, [Data_integracao_sistema_externo] = @Data_integracao_sistema_externo, [Pk_acto_composto] = @Pk_acto_composto, [Pk_marcacao_multipla] = @Pk_marcacao_multipla, [Num_extracto] = @Num_extracto, [Pk_local_realizacao] = @Pk_local_realizacao, [Data_ins] = @Data_ins, [Pk_consumo_para_facturacao] = @Pk_consumo_para_facturacao, [Pk_detalhe_facturacao_adicional] = @Pk_detalhe_facturacao_adicional, [Acto_facturacao_adicional] = @Acto_facturacao_adicional, [Pk_iva] = @Pk_iva, [Valor_text] = @Valor_text, [Total_K_text] = @Total_K_text, [Total_moeda_text] = @Total_moeda_text, [Percentagem_valor_no_total_detalhe_text] = @Percentagem_valor_no_total_detalhe_text, [Valor_inclui_iva_usa_definicao_instalacao] = @Valor_inclui_iva_usa_definicao_instalacao, [Valor_Precos_actos_produtos_incluem_iva] = @Valor_Precos_actos_produtos_incluem_iva WHERE (([Pk] = @Original_Pk) AND ((@IsNull_RowVersion = 1 AND [RowVersion] IS NULL) OR ([RowVersion] = @Original_RowVersion)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_factura" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_factura" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Quantidade" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Quantidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@codigo_acto_clinico" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="codigo_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_acto_clinico" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Nome_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Percentagem_iva" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Percentagem_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Percentagem_desconto" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Percentagem_desconto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_K" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_K" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_moeda" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_moeda" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_executante" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_executante" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_Centro_custos" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_Centro_custos" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@np_utente" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="np_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@nome_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="nome_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_beneficiario" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_beneficiario" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Pago" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Pago" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_documento_pagamento" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_documento_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_detalhe_factura_dependente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_detalhe_factura_dependente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_consumo" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_consumo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_produto" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_produto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Agrupado_por_rubrica" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Agrupado_por_rubrica" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico_para_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico_para_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_armazem" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_armazem" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_recibo" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_recibo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Ignorar" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Ignorar" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_iva" Precision="18" ProviderType="Decimal" Scale="10" Size="0" SourceColumn="Valor_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Preco_final_inclui_iva" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Preco_final_inclui_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_detalhe_pai" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_detalhe_pai" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Percentagem_valor_no_total_detalhe" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Percentagem_valor_no_total_detalhe" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Transaccao" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Transaccao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_plano_saude" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_plano_saude" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Numero_cliente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Numero_cliente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Codigo_contabilidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Codigo_contabilidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_integracao_sistema_externo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_integracao_sistema_externo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_composto" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_composto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_marcacao_multipla" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_marcacao_multipla" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_extracto" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_extracto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_local_realizacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_local_realizacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_ins" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_ins" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_consumo_para_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_consumo_para_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_detalhe_facturacao_adicional" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_detalhe_facturacao_adicional" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Acto_facturacao_adicional" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Acto_facturacao_adicional" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Pk_iva" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Pk_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_K_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_K_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_moeda_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_moeda_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Percentagem_valor_no_total_detalhe_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Percentagem_valor_no_total_detalhe_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_inclui_iva_usa_definicao_instalacao" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_inclui_iva_usa_definicao_instalacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_Precos_actos_produtos_incluem_iva" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_Precos_actos_produtos_incluem_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Original_Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_RowVersion" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="RowVersion" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Binary" Direction="Input" ParameterName="@Original_RowVersion" Precision="0" ProviderType="Timestamp" Scale="0" Size="0" SourceColumn="RowVersion" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Pk" DataSetColumn="Pk" />
              <Mapping SourceColumn="Pk_factura" DataSetColumn="Pk_factura" />
              <Mapping SourceColumn="Quantidade" DataSetColumn="Quantidade" />
              <Mapping SourceColumn="Pk_acto_clinico" DataSetColumn="Pk_acto_clinico" />
              <Mapping SourceColumn="codigo_acto_clinico" DataSetColumn="codigo_acto_clinico" />
              <Mapping SourceColumn="Nome_acto_clinico" DataSetColumn="Nome_acto_clinico" />
              <Mapping SourceColumn="Valor" DataSetColumn="Valor" />
              <Mapping SourceColumn="Percentagem_iva" DataSetColumn="Percentagem_iva" />
              <Mapping SourceColumn="Percentagem_desconto" DataSetColumn="Percentagem_desconto" />
              <Mapping SourceColumn="Total_K" DataSetColumn="Total_K" />
              <Mapping SourceColumn="Total_moeda" DataSetColumn="Total_moeda" />
              <Mapping SourceColumn="Pk_executante" DataSetColumn="Pk_executante" />
              <Mapping SourceColumn="Pk_Centro_custos" DataSetColumn="Pk_Centro_custos" />
              <Mapping SourceColumn="pk_utente" DataSetColumn="pk_utente" />
              <Mapping SourceColumn="np_utente" DataSetColumn="np_utente" />
              <Mapping SourceColumn="nome_utente" DataSetColumn="nome_utente" />
              <Mapping SourceColumn="Pk_acto_clinico_utente" DataSetColumn="Pk_acto_clinico_utente" />
              <Mapping SourceColumn="Num_beneficiario" DataSetColumn="Num_beneficiario" />
              <Mapping SourceColumn="Pago" DataSetColumn="Pago" />
              <Mapping SourceColumn="Num_documento_pagamento" DataSetColumn="Num_documento_pagamento" />
              <Mapping SourceColumn="pk_detalhe_factura_dependente" DataSetColumn="pk_detalhe_factura_dependente" />
              <Mapping SourceColumn="Data" DataSetColumn="Data" />
              <Mapping SourceColumn="Pk_consumo" DataSetColumn="Pk_consumo" />
              <Mapping SourceColumn="Pk_produto" DataSetColumn="Pk_produto" />
              <Mapping SourceColumn="Agrupado_por_rubrica" DataSetColumn="Agrupado_por_rubrica" />
              <Mapping SourceColumn="Pk_acto_clinico_para_facturacao" DataSetColumn="Pk_acto_clinico_para_facturacao" />
              <Mapping SourceColumn="Pk_armazem" DataSetColumn="Pk_armazem" />
              <Mapping SourceColumn="Pk_recibo" DataSetColumn="Pk_recibo" />
              <Mapping SourceColumn="Ignorar" DataSetColumn="Ignorar" />
              <Mapping SourceColumn="Valor_iva" DataSetColumn="Valor_iva" />
              <Mapping SourceColumn="Preco_final_inclui_iva" DataSetColumn="Preco_final_inclui_iva" />
              <Mapping SourceColumn="Pk_detalhe_pai" DataSetColumn="Pk_detalhe_pai" />
              <Mapping SourceColumn="Percentagem_valor_no_total_detalhe" DataSetColumn="Percentagem_valor_no_total_detalhe" />
              <Mapping SourceColumn="Transaccao" DataSetColumn="Transaccao" />
              <Mapping SourceColumn="Pk_plano_saude" DataSetColumn="Pk_plano_saude" />
              <Mapping SourceColumn="Numero_cliente" DataSetColumn="Numero_cliente" />
              <Mapping SourceColumn="Codigo_contabilidade" DataSetColumn="Codigo_contabilidade" />
              <Mapping SourceColumn="Data_integracao_sistema_externo" DataSetColumn="Data_integracao_sistema_externo" />
              <Mapping SourceColumn="Pk_acto_composto" DataSetColumn="Pk_acto_composto" />
              <Mapping SourceColumn="Pk_marcacao_multipla" DataSetColumn="Pk_marcacao_multipla" />
              <Mapping SourceColumn="Num_extracto" DataSetColumn="Num_extracto" />
              <Mapping SourceColumn="Pk_local_realizacao" DataSetColumn="Pk_local_realizacao" />
              <Mapping SourceColumn="Data_ins" DataSetColumn="Data_ins" />
              <Mapping SourceColumn="RowVersion" DataSetColumn="RowVersion" />
              <Mapping SourceColumn="Pk_consumo_para_facturacao" DataSetColumn="Pk_consumo_para_facturacao" />
              <Mapping SourceColumn="Pk_detalhe_facturacao_adicional" DataSetColumn="Pk_detalhe_facturacao_adicional" />
              <Mapping SourceColumn="Acto_facturacao_adicional" DataSetColumn="Acto_facturacao_adicional" />
              <Mapping SourceColumn="Pk_iva" DataSetColumn="Pk_iva" />
              <Mapping SourceColumn="Valor_text" DataSetColumn="Valor_text" />
              <Mapping SourceColumn="Total_K_text" DataSetColumn="Total_K_text" />
              <Mapping SourceColumn="Total_moeda_text" DataSetColumn="Total_moeda_text" />
              <Mapping SourceColumn="Percentagem_valor_no_total_detalhe_text" DataSetColumn="Percentagem_valor_no_total_detalhe_text" />
              <Mapping SourceColumn="Valor_inclui_iva_usa_definicao_instalacao" DataSetColumn="Valor_inclui_iva_usa_definicao_instalacao" />
              <Mapping SourceColumn="Valor_Precos_actos_produtos_incluem_iva" DataSetColumn="Valor_Precos_actos_produtos_incluem_iva" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="M1ConnectionString (Settings)" DbObjectName="MedicineOneTC18.dbo.FACT_DETALHE_FACTURAS" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByPkFactura" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByPkFactura" GeneratorSourceName="FillByPkFactura" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="FillByPkFactura">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        *
FROM            FACT_DETALHE_FACTURAS
where Pk_factura = @PkFactura</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="PkFactura" ColumnName="Pk_factura" DataSourceName="MedicineOneTC18.dbo.FACT_DETALHE_FACTURAS" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@PkFactura" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="Pk_factura" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="FACT_DETALHE_FACTURAS_AUXILIARTableAdapter" GeneratorDataComponentClassName="FACT_DETALHE_FACTURAS_AUXILIARTableAdapter" Name="FACT_DETALHE_FACTURAS_AUXILIAR" UserDataComponentName="FACT_DETALHE_FACTURAS_AUXILIARTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="M1ConnectionString (Settings)" DbObjectName="MedicineOneTC18.dbo.FACT_DETALHE_FACTURAS_AUXILIAR" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorSourceName="Fill" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [FACT_DETALHE_FACTURAS_AUXILIAR] ([Pk], [Pk_factura], [Quantidade], [Pk_acto_clinico], [codigo_acto_clinico], [Nome_acto_clinico], [Valor], [Percentagem_iva], [Percentagem_desconto], [Total_K], [Total_moeda], [Pk_executante], [Pk_Centro_custos], [pk_utente], [np_utente], [nome_utente], [Pk_acto_clinico_utente], [Num_beneficiario], [Pago], [Num_documento_pagamento], [pk_detalhe_factura_dependente], [Data], [Pk_consumo], [Pk_produto], [Agrupado_por_rubrica], [Pk_acto_clinico_para_facturacao], [Pk_armazem], [Pk_recibo], [Ignorar], [Preco_final_inclui_iva], [Valor_iva], [Pk_detalhe_pai], [Percentagem_valor_no_total_detalhe], [Transaccao], [Pk_plano_saude], [Numero_cliente], [Codigo_contabilidade], [Data_integracao_sistema_externo], [Pk_acto_composto], [Pk_marcacao_multipla], [Pk_fact_detalhe_facturas_agrupador], [Valor_agrupador_depende_componentes], [Num_extracto], [Pk_local_realizacao], [Data_ins], [Pk_consumo_para_facturacao], [Pk_detalhe_facturacao_adicional], [Acto_facturacao_adicional], [Pk_iva], [Valor_inclui_iva_usa_definicao_instalacao], [Valor_Precos_actos_produtos_incluem_iva], [Valor_text], [Total_K_text], [Total_moeda_text], [Valor_iva_text], [Percentagem_desconto_text], [Percentagem_valor_no_total_detalhe_text]) VALUES (@Pk, @Pk_factura, @Quantidade, @Pk_acto_clinico, @codigo_acto_clinico, @Nome_acto_clinico, @Valor, @Percentagem_iva, @Percentagem_desconto, @Total_K, @Total_moeda, @Pk_executante, @Pk_Centro_custos, @pk_utente, @np_utente, @nome_utente, @Pk_acto_clinico_utente, @Num_beneficiario, @Pago, @Num_documento_pagamento, @pk_detalhe_factura_dependente, @Data, @Pk_consumo, @Pk_produto, @Agrupado_por_rubrica, @Pk_acto_clinico_para_facturacao, @Pk_armazem, @Pk_recibo, @Ignorar, @Preco_final_inclui_iva, @Valor_iva, @Pk_detalhe_pai, @Percentagem_valor_no_total_detalhe, @Transaccao, @Pk_plano_saude, @Numero_cliente, @Codigo_contabilidade, @Data_integracao_sistema_externo, @Pk_acto_composto, @Pk_marcacao_multipla, @Pk_fact_detalhe_facturas_agrupador, @Valor_agrupador_depende_componentes, @Num_extracto, @Pk_local_realizacao, @Data_ins, @Pk_consumo_para_facturacao, @Pk_detalhe_facturacao_adicional, @Acto_facturacao_adicional, @Pk_iva, @Valor_inclui_iva_usa_definicao_instalacao, @Valor_Precos_actos_produtos_incluem_iva, @Valor_text, @Total_K_text, @Total_moeda_text, @Valor_iva_text, @Percentagem_desconto_text, @Percentagem_valor_no_total_detalhe_text)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_factura" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_factura" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Quantidade" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Quantidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@codigo_acto_clinico" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="codigo_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome_acto_clinico" Precision="0" ProviderType="Text" Scale="0" Size="0" SourceColumn="Nome_acto_clinico" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@Percentagem_iva" Precision="0" ProviderType="TinyInt" Scale="0" Size="0" SourceColumn="Percentagem_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Percentagem_desconto" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Percentagem_desconto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_K" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_K" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Total_moeda" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Total_moeda" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_executante" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_executante" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_Centro_custos" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_Centro_custos" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@np_utente" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="np_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@nome_utente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="nome_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico_utente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico_utente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_beneficiario" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_beneficiario" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Pago" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Pago" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_documento_pagamento" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_documento_pagamento" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@pk_detalhe_factura_dependente" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="pk_detalhe_factura_dependente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_consumo" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_consumo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_produto" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_produto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Agrupado_por_rubrica" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Agrupado_por_rubrica" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_clinico_para_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_clinico_para_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_armazem" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_armazem" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_recibo" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_recibo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Ignorar" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Ignorar" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Preco_final_inclui_iva" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Preco_final_inclui_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Valor_iva" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Valor_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_detalhe_pai" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_detalhe_pai" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Percentagem_valor_no_total_detalhe" Precision="18" ProviderType="Decimal" Scale="6" Size="0" SourceColumn="Percentagem_valor_no_total_detalhe" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Transaccao" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Transaccao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_plano_saude" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_plano_saude" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Numero_cliente" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Numero_cliente" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Codigo_contabilidade" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Codigo_contabilidade" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_integracao_sistema_externo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_integracao_sistema_externo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_acto_composto" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_acto_composto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_marcacao_multipla" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_marcacao_multipla" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_fact_detalhe_facturas_agrupador" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_fact_detalhe_facturas_agrupador" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_agrupador_depende_componentes" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_agrupador_depende_componentes" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Num_extracto" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Num_extracto" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_local_realizacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_local_realizacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Data_ins" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Data_ins" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_consumo_para_facturacao" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_consumo_para_facturacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Pk_detalhe_facturacao_adicional" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Pk_detalhe_facturacao_adicional" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Acto_facturacao_adicional" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Acto_facturacao_adicional" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Pk_iva" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Pk_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_inclui_iva_usa_definicao_instalacao" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_inclui_iva_usa_definicao_instalacao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Valor_Precos_actos_produtos_incluem_iva" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Valor_Precos_actos_produtos_incluem_iva" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_K_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_K_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Total_moeda_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Total_moeda_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Valor_iva_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Valor_iva_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Percentagem_desconto_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Percentagem_desconto_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Percentagem_valor_no_total_detalhe_text" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Percentagem_valor_no_total_detalhe_text" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        FACT_DETALHE_FACTURAS_AUXILIAR.*
FROM            FACT_DETALHE_FACTURAS_AUXILIAR</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Pk" DataSetColumn="Pk" />
              <Mapping SourceColumn="Pk_factura" DataSetColumn="Pk_factura" />
              <Mapping SourceColumn="Quantidade" DataSetColumn="Quantidade" />
              <Mapping SourceColumn="Pk_acto_clinico" DataSetColumn="Pk_acto_clinico" />
              <Mapping SourceColumn="codigo_acto_clinico" DataSetColumn="codigo_acto_clinico" />
              <Mapping SourceColumn="Nome_acto_clinico" DataSetColumn="Nome_acto_clinico" />
              <Mapping SourceColumn="Valor" DataSetColumn="Valor" />
              <Mapping SourceColumn="Percentagem_iva" DataSetColumn="Percentagem_iva" />
              <Mapping SourceColumn="Percentagem_desconto" DataSetColumn="Percentagem_desconto" />
              <Mapping SourceColumn="Total_K" DataSetColumn="Total_K" />
              <Mapping SourceColumn="Total_moeda" DataSetColumn="Total_moeda" />
              <Mapping SourceColumn="Pk_executante" DataSetColumn="Pk_executante" />
              <Mapping SourceColumn="Pk_Centro_custos" DataSetColumn="Pk_Centro_custos" />
              <Mapping SourceColumn="pk_utente" DataSetColumn="pk_utente" />
              <Mapping SourceColumn="np_utente" DataSetColumn="np_utente" />
              <Mapping SourceColumn="nome_utente" DataSetColumn="nome_utente" />
              <Mapping SourceColumn="Pk_acto_clinico_utente" DataSetColumn="Pk_acto_clinico_utente" />
              <Mapping SourceColumn="Num_beneficiario" DataSetColumn="Num_beneficiario" />
              <Mapping SourceColumn="Pago" DataSetColumn="Pago" />
              <Mapping SourceColumn="Num_documento_pagamento" DataSetColumn="Num_documento_pagamento" />
              <Mapping SourceColumn="pk_detalhe_factura_dependente" DataSetColumn="pk_detalhe_factura_dependente" />
              <Mapping SourceColumn="Data" DataSetColumn="Data" />
              <Mapping SourceColumn="Pk_consumo" DataSetColumn="Pk_consumo" />
              <Mapping SourceColumn="Pk_produto" DataSetColumn="Pk_produto" />
              <Mapping SourceColumn="Agrupado_por_rubrica" DataSetColumn="Agrupado_por_rubrica" />
              <Mapping SourceColumn="Pk_acto_clinico_para_facturacao" DataSetColumn="Pk_acto_clinico_para_facturacao" />
              <Mapping SourceColumn="Pk_armazem" DataSetColumn="Pk_armazem" />
              <Mapping SourceColumn="Pk_recibo" DataSetColumn="Pk_recibo" />
              <Mapping SourceColumn="Ignorar" DataSetColumn="Ignorar" />
              <Mapping SourceColumn="Preco_final_inclui_iva" DataSetColumn="Preco_final_inclui_iva" />
              <Mapping SourceColumn="Valor_iva" DataSetColumn="Valor_iva" />
              <Mapping SourceColumn="Pk_detalhe_pai" DataSetColumn="Pk_detalhe_pai" />
              <Mapping SourceColumn="Percentagem_valor_no_total_detalhe" DataSetColumn="Percentagem_valor_no_total_detalhe" />
              <Mapping SourceColumn="Transaccao" DataSetColumn="Transaccao" />
              <Mapping SourceColumn="Pk_plano_saude" DataSetColumn="Pk_plano_saude" />
              <Mapping SourceColumn="Numero_cliente" DataSetColumn="Numero_cliente" />
              <Mapping SourceColumn="Codigo_contabilidade" DataSetColumn="Codigo_contabilidade" />
              <Mapping SourceColumn="Data_integracao_sistema_externo" DataSetColumn="Data_integracao_sistema_externo" />
              <Mapping SourceColumn="Pk_acto_composto" DataSetColumn="Pk_acto_composto" />
              <Mapping SourceColumn="Pk_marcacao_multipla" DataSetColumn="Pk_marcacao_multipla" />
              <Mapping SourceColumn="Pk_fact_detalhe_facturas_agrupador" DataSetColumn="Pk_fact_detalhe_facturas_agrupador" />
              <Mapping SourceColumn="Valor_agrupador_depende_componentes" DataSetColumn="Valor_agrupador_depende_componentes" />
              <Mapping SourceColumn="Num_extracto" DataSetColumn="Num_extracto" />
              <Mapping SourceColumn="Pk_local_realizacao" DataSetColumn="Pk_local_realizacao" />
              <Mapping SourceColumn="Data_ins" DataSetColumn="Data_ins" />
              <Mapping SourceColumn="Pk_consumo_para_facturacao" DataSetColumn="Pk_consumo_para_facturacao" />
              <Mapping SourceColumn="Pk_detalhe_facturacao_adicional" DataSetColumn="Pk_detalhe_facturacao_adicional" />
              <Mapping SourceColumn="Acto_facturacao_adicional" DataSetColumn="Acto_facturacao_adicional" />
              <Mapping SourceColumn="Pk_iva" DataSetColumn="Pk_iva" />
              <Mapping SourceColumn="Valor_inclui_iva_usa_definicao_instalacao" DataSetColumn="Valor_inclui_iva_usa_definicao_instalacao" />
              <Mapping SourceColumn="Valor_Precos_actos_produtos_incluem_iva" DataSetColumn="Valor_Precos_actos_produtos_incluem_iva" />
              <Mapping SourceColumn="Valor_text" DataSetColumn="Valor_text" />
              <Mapping SourceColumn="Total_K_text" DataSetColumn="Total_K_text" />
              <Mapping SourceColumn="Total_moeda_text" DataSetColumn="Total_moeda_text" />
              <Mapping SourceColumn="Valor_iva_text" DataSetColumn="Valor_iva_text" />
              <Mapping SourceColumn="Percentagem_desconto_text" DataSetColumn="Percentagem_desconto_text" />
              <Mapping SourceColumn="Percentagem_valor_no_total_detalhe_text" DataSetColumn="Percentagem_valor_no_total_detalhe_text" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="M1ConnectionString (Settings)" DbObjectName="MedicineOneTC18.dbo.FACT_DETALHE_FACTURAS_AUXILIAR" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByPkFactura" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByPkFactura" GeneratorSourceName="FillByPkFactura" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="FillByPkFactura">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        *
FROM            FACT_DETALHE_FACTURAS_AUXILIAR
where Pk_factura = @PkFactura</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="PkFactura" ColumnName="Pk_factura" DataSourceName="MedicineOneTC18.dbo.FACT_DETALHE_FACTURAS_AUXILIAR" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@PkFactura" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="Pk_factura" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DataSetTest" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSetTest" msprop:Generator_UserDSName="DataSetTest">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="FACT_FACTURAS" msprop:Generator_TableClassName="FACT_FACTURASDataTable" msprop:Generator_TableVarName="tableFACT_FACTURAS" msprop:Generator_RowChangedName="FACT_FACTURASRowChanged" msprop:Generator_TablePropName="FACT_FACTURAS" msprop:Generator_RowDeletingName="FACT_FACTURASRowDeleting" msprop:Generator_RowChangingName="FACT_FACTURASRowChanging" msprop:Generator_RowEvHandlerName="FACT_FACTURASRowChangeEventHandler" msprop:Generator_RowDeletedName="FACT_FACTURASRowDeleted" msprop:Generator_RowClassName="FACT_FACTURASRow" msprop:Generator_UserTableName="FACT_FACTURAS" msprop:Generator_RowEvArgName="FACT_FACTURASRowChangeEvent">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Pk" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk" msprop:Generator_ColumnPropNameInRow="Pk" msprop:Generator_ColumnPropNameInTable="PkColumn" msprop:Generator_UserColumnName="Pk" type="xs:string" />
              <xs:element name="Pk_organizacao_emissora" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_organizacao_emissora" msprop:Generator_ColumnPropNameInRow="Pk_organizacao_emissora" msprop:Generator_ColumnPropNameInTable="Pk_organizacao_emissoraColumn" msprop:Generator_UserColumnName="Pk_organizacao_emissora" type="xs:string" />
              <xs:element name="Numero" msprop:Generator_ColumnVarNameInTable="columnNumero" msprop:Generator_ColumnPropNameInRow="Numero" msprop:Generator_ColumnPropNameInTable="NumeroColumn" msprop:Generator_UserColumnName="Numero" type="xs:int" />
              <xs:element name="Pk_serie_facturacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_serie_facturacao" msprop:Generator_ColumnPropNameInRow="Pk_serie_facturacao" msprop:Generator_ColumnPropNameInTable="Pk_serie_facturacaoColumn" msprop:Generator_UserColumnName="Pk_serie_facturacao" type="xs:string" />
              <xs:element name="Data" msprop:Generator_ColumnVarNameInTable="columnData" msprop:Generator_ColumnPropNameInRow="Data" msprop:Generator_ColumnPropNameInTable="DataColumn" msprop:Generator_UserColumnName="Data" type="xs:dateTime" />
              <xs:element name="Morada" msprop:Generator_ColumnVarNameInTable="columnMorada" msprop:Generator_ColumnPropNameInRow="Morada" msprop:Generator_ColumnPropNameInTable="MoradaColumn" msprop:Generator_UserColumnName="Morada" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Num_contribuinte" msprop:Generator_ColumnVarNameInTable="columnNum_contribuinte" msprop:Generator_ColumnPropNameInRow="Num_contribuinte" msprop:Generator_ColumnPropNameInTable="Num_contribuinteColumn" msprop:Generator_UserColumnName="Num_contribuinte" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="40" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_entidade" msprop:Generator_ColumnVarNameInTable="columnPk_entidade" msprop:Generator_ColumnPropNameInRow="Pk_entidade" msprop:Generator_ColumnPropNameInTable="Pk_entidadeColumn" msprop:Generator_UserColumnName="Pk_entidade" type="xs:long" minOccurs="0" />
              <xs:element name="Nome_entidade" msprop:Generator_ColumnVarNameInTable="columnNome_entidade" msprop:Generator_ColumnPropNameInRow="Nome_entidade" msprop:Generator_ColumnPropNameInTable="Nome_entidadeColumn" msprop:Generator_UserColumnName="Nome_entidade" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Morada_entidade" msprop:Generator_ColumnVarNameInTable="columnMorada_entidade" msprop:Generator_ColumnPropNameInRow="Morada_entidade" msprop:Generator_ColumnPropNameInTable="Morada_entidadeColumn" msprop:Generator_UserColumnName="Morada_entidade" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Num_contribuinte_entidade" msprop:Generator_ColumnVarNameInTable="columnNum_contribuinte_entidade" msprop:Generator_ColumnPropNameInRow="Num_contribuinte_entidade" msprop:Generator_ColumnPropNameInTable="Num_contribuinte_entidadeColumn" msprop:Generator_UserColumnName="Num_contribuinte_entidade" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Paga" msprop:Generator_ColumnVarNameInTable="columnPaga" msprop:Generator_ColumnPropNameInRow="Paga" msprop:Generator_ColumnPropNameInTable="PagaColumn" msprop:Generator_UserColumnName="Paga" type="xs:boolean" minOccurs="0" />
              <xs:element name="Modo_pagamento" msprop:Generator_ColumnVarNameInTable="columnModo_pagamento" msprop:Generator_ColumnPropNameInRow="Modo_pagamento" msprop:Generator_ColumnPropNameInTable="Modo_pagamentoColumn" msprop:Generator_UserColumnName="Modo_pagamento" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="Num_cheque" msprop:Generator_ColumnVarNameInTable="columnNum_cheque" msprop:Generator_ColumnPropNameInRow="Num_cheque" msprop:Generator_ColumnPropNameInTable="Num_chequeColumn" msprop:Generator_UserColumnName="Num_cheque" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_utente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_utente" msprop:Generator_ColumnPropNameInRow="Pk_utente" msprop:Generator_ColumnPropNameInTable="Pk_utenteColumn" msprop:Generator_UserColumnName="Pk_utente" type="xs:string" minOccurs="0" />
              <xs:element name="Nome_utente" msprop:Generator_ColumnVarNameInTable="columnNome_utente" msprop:Generator_ColumnPropNameInRow="Nome_utente" msprop:Generator_ColumnPropNameInTable="Nome_utenteColumn" msprop:Generator_UserColumnName="Nome_utente" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Recibo_emitido" msprop:Generator_ColumnVarNameInTable="columnRecibo_emitido" msprop:Generator_ColumnPropNameInRow="Recibo_emitido" msprop:Generator_ColumnPropNameInTable="Recibo_emitidoColumn" msprop:Generator_UserColumnName="Recibo_emitido" type="xs:boolean" minOccurs="0" />
              <xs:element name="Num_recibo" msprop:Generator_ColumnVarNameInTable="columnNum_recibo" msprop:Generator_ColumnPropNameInRow="Num_recibo" msprop:Generator_ColumnPropNameInTable="Num_reciboColumn" msprop:Generator_UserColumnName="Num_recibo" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Tipo_documento" msprop:Generator_ColumnVarNameInTable="columnTipo_documento" msprop:Generator_ColumnPropNameInRow="Tipo_documento" msprop:Generator_ColumnPropNameInTable="Tipo_documentoColumn" msprop:Generator_UserColumnName="Tipo_documento" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="Anulada" msprop:Generator_ColumnVarNameInTable="columnAnulada" msprop:Generator_ColumnPropNameInRow="Anulada" msprop:Generator_ColumnPropNameInTable="AnuladaColumn" msprop:Generator_UserColumnName="Anulada" type="xs:boolean" />
              <xs:element name="pendente" msprop:Generator_ColumnVarNameInTable="columnpendente" msprop:Generator_ColumnPropNameInRow="pendente" msprop:Generator_ColumnPropNameInTable="pendenteColumn" msprop:Generator_UserColumnName="pendente" type="xs:boolean" />
              <xs:element name="Valor_total" msprop:Generator_ColumnVarNameInTable="columnValor_total" msprop:Generator_ColumnPropNameInRow="Valor_total" msprop:Generator_ColumnPropNameInTable="Valor_totalColumn" msprop:Generator_UserColumnName="Valor_total" type="xs:decimal" minOccurs="0" />
              <xs:element name="Valor_pago" msprop:Generator_ColumnVarNameInTable="columnValor_pago" msprop:Generator_ColumnPropNameInRow="Valor_pago" msprop:Generator_ColumnPropNameInTable="Valor_pagoColumn" msprop:Generator_UserColumnName="Valor_pago" type="xs:decimal" minOccurs="0" />
              <xs:element name="Utilizador_ins" msprop:Generator_ColumnVarNameInTable="columnUtilizador_ins" msprop:Generator_ColumnPropNameInRow="Utilizador_ins" msprop:Generator_ColumnPropNameInTable="Utilizador_insColumn" msprop:Generator_UserColumnName="Utilizador_ins" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="pk_documento" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnpk_documento" msprop:Generator_ColumnPropNameInRow="pk_documento" msprop:Generator_ColumnPropNameInTable="pk_documentoColumn" msprop:Generator_UserColumnName="pk_documento" type="xs:string" minOccurs="0" />
              <xs:element name="Num_beneficiario_utente" msprop:Generator_ColumnVarNameInTable="columnNum_beneficiario_utente" msprop:Generator_ColumnPropNameInRow="Num_beneficiario_utente" msprop:Generator_ColumnPropNameInTable="Num_beneficiario_utenteColumn" msprop:Generator_UserColumnName="Num_beneficiario_utente" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Nome_sistema_saude" msprop:Generator_ColumnVarNameInTable="columnNome_sistema_saude" msprop:Generator_ColumnPropNameInRow="Nome_sistema_saude" msprop:Generator_ColumnPropNameInTable="Nome_sistema_saudeColumn" msprop:Generator_UserColumnName="Nome_sistema_saude" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_unidade_organica_utilizador_emissor" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_unidade_organica_utilizador_emissor" msprop:Generator_ColumnPropNameInRow="Pk_unidade_organica_utilizador_emissor" msprop:Generator_ColumnPropNameInTable="Pk_unidade_organica_utilizador_emissorColumn" msprop:Generator_UserColumnName="Pk_unidade_organica_utilizador_emissor" type="xs:string" minOccurs="0" />
              <xs:element name="Modo_pagamento_parcial" msprop:Generator_ColumnVarNameInTable="columnModo_pagamento_parcial" msprop:Generator_ColumnPropNameInRow="Modo_pagamento_parcial" msprop:Generator_ColumnPropNameInTable="Modo_pagamento_parcialColumn" msprop:Generator_UserColumnName="Modo_pagamento_parcial" type="xs:boolean" minOccurs="0" />
              <xs:element name="Total_notas_credito" msprop:Generator_ColumnVarNameInTable="columnTotal_notas_credito" msprop:Generator_ColumnPropNameInRow="Total_notas_credito" msprop:Generator_ColumnPropNameInTable="Total_notas_creditoColumn" msprop:Generator_UserColumnName="Total_notas_credito" type="xs:decimal" minOccurs="0" />
              <xs:element name="Documento_encerrado" msprop:Generator_ColumnVarNameInTable="columnDocumento_encerrado" msprop:Generator_ColumnPropNameInRow="Documento_encerrado" msprop:Generator_ColumnPropNameInTable="Documento_encerradoColumn" msprop:Generator_UserColumnName="Documento_encerrado" type="xs:boolean" minOccurs="0" />
              <xs:element name="Documento_integrado" msprop:Generator_ColumnVarNameInTable="columnDocumento_integrado" msprop:Generator_ColumnPropNameInRow="Documento_integrado" msprop:Generator_ColumnPropNameInTable="Documento_integradoColumn" msprop:Generator_UserColumnName="Documento_integrado" type="xs:boolean" minOccurs="0" />
              <xs:element name="Observacoes" msprop:Generator_ColumnVarNameInTable="columnObservacoes" msprop:Generator_ColumnPropNameInRow="Observacoes" msprop:Generator_ColumnPropNameInTable="ObservacoesColumn" msprop:Generator_UserColumnName="Observacoes" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_template_documento" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_template_documento" msprop:Generator_ColumnPropNameInRow="Pk_template_documento" msprop:Generator_ColumnPropNameInTable="Pk_template_documentoColumn" msprop:Generator_UserColumnName="Pk_template_documento" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_plano_saude_utente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_plano_saude_utente" msprop:Generator_ColumnPropNameInRow="Pk_plano_saude_utente" msprop:Generator_ColumnPropNameInTable="Pk_plano_saude_utenteColumn" msprop:Generator_UserColumnName="Pk_plano_saude_utente" type="xs:string" minOccurs="0" />
              <xs:element name="Data_integracao_sistema_externo" msprop:Generator_ColumnVarNameInTable="columnData_integracao_sistema_externo" msprop:Generator_ColumnPropNameInRow="Data_integracao_sistema_externo" msprop:Generator_ColumnPropNameInTable="Data_integracao_sistema_externoColumn" msprop:Generator_UserColumnName="Data_integracao_sistema_externo" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Nome_alternativo" msprop:Generator_ColumnVarNameInTable="columnNome_alternativo" msprop:Generator_ColumnPropNameInRow="Nome_alternativo" msprop:Generator_ColumnPropNameInTable="Nome_alternativoColumn" msprop:Generator_UserColumnName="Nome_alternativo" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Morada_alternativa" msprop:Generator_ColumnVarNameInTable="columnMorada_alternativa" msprop:Generator_ColumnPropNameInRow="Morada_alternativa" msprop:Generator_ColumnPropNameInTable="Morada_alternativaColumn" msprop:Generator_UserColumnName="Morada_alternativa" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Num_contribuinte_alternativo" msprop:Generator_ColumnVarNameInTable="columnNum_contribuinte_alternativo" msprop:Generator_ColumnPropNameInRow="Num_contribuinte_alternativo" msprop:Generator_ColumnPropNameInTable="Num_contribuinte_alternativoColumn" msprop:Generator_UserColumnName="Num_contribuinte_alternativo" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="40" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Num_prestacoes_para_pagamento" msprop:Generator_ColumnVarNameInTable="columnNum_prestacoes_para_pagamento" msprop:Generator_ColumnPropNameInRow="Num_prestacoes_para_pagamento" msprop:Generator_ColumnPropNameInTable="Num_prestacoes_para_pagamentoColumn" msprop:Generator_UserColumnName="Num_prestacoes_para_pagamento" type="xs:int" minOccurs="0" />
              <xs:element name="Factura_singular" msprop:Generator_ColumnVarNameInTable="columnFactura_singular" msprop:Generator_ColumnPropNameInRow="Factura_singular" msprop:Generator_ColumnPropNameInTable="Factura_singularColumn" msprop:Generator_UserColumnName="Factura_singular" type="xs:boolean" minOccurs="0" />
              <xs:element name="Pk_entidade_utente" msprop:Generator_ColumnVarNameInTable="columnPk_entidade_utente" msprop:Generator_ColumnPropNameInRow="Pk_entidade_utente" msprop:Generator_ColumnPropNameInTable="Pk_entidade_utenteColumn" msprop:Generator_UserColumnName="Pk_entidade_utente" type="xs:int" minOccurs="0" />
              <xs:element name="Hash" msprop:Generator_ColumnVarNameInTable="columnHash" msprop:Generator_ColumnPropNameInRow="Hash" msprop:Generator_ColumnPropNameInTable="HashColumn" msprop:Generator_UserColumnName="Hash" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="172" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Hash_control" msprop:Generator_ColumnVarNameInTable="columnHash_control" msprop:Generator_ColumnPropNameInRow="Hash_control" msprop:Generator_ColumnPropNameInTable="Hash_controlColumn" msprop:Generator_UserColumnName="Hash_control" type="xs:int" minOccurs="0" />
              <xs:element name="Pk_nota_devolucao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_nota_devolucao" msprop:Generator_ColumnPropNameInRow="Pk_nota_devolucao" msprop:Generator_ColumnPropNameInTable="Pk_nota_devolucaoColumn" msprop:Generator_UserColumnName="Pk_nota_devolucao" type="xs:string" minOccurs="0" />
              <xs:element name="Valor_total_text" msprop:Generator_ColumnVarNameInTable="columnValor_total_text" msprop:Generator_ColumnPropNameInRow="Valor_total_text" msprop:Generator_ColumnPropNameInTable="Valor_total_textColumn" msprop:Generator_UserColumnName="Valor_total_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Valor_pago_text" msprop:Generator_ColumnVarNameInTable="columnValor_pago_text" msprop:Generator_ColumnPropNameInRow="Valor_pago_text" msprop:Generator_ColumnPropNameInTable="Valor_pago_textColumn" msprop:Generator_UserColumnName="Valor_pago_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Total_notas_credito_text" msprop:Generator_ColumnVarNameInTable="columnTotal_notas_credito_text" msprop:Generator_ColumnPropNameInRow="Total_notas_credito_text" msprop:Generator_ColumnPropNameInTable="Total_notas_credito_textColumn" msprop:Generator_UserColumnName="Total_notas_credito_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_moeda" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_moeda" msprop:Generator_ColumnPropNameInRow="Pk_moeda" msprop:Generator_ColumnPropNameInTable="Pk_moedaColumn" msprop:Generator_UserColumnName="Pk_moeda" type="xs:string" minOccurs="0" />
              <xs:element name="Factura_lotes" msprop:Generator_ColumnVarNameInTable="columnFactura_lotes" msprop:Generator_ColumnPropNameInRow="Factura_lotes" msprop:Generator_ColumnPropNameInTable="Factura_lotesColumn" msprop:Generator_UserColumnName="Factura_lotes" type="xs:boolean" minOccurs="0" />
              <xs:element name="NumeroUnico" msprop:Generator_ColumnVarNameInTable="columnNumeroUnico" msprop:Generator_ColumnPropNameInRow="NumeroUnico" msprop:Generator_ColumnPropNameInTable="NumeroUnicoColumn" msprop:Generator_UserColumnName="NumeroUnico" type="xs:int" minOccurs="0" />
              <xs:element name="M1SysRowVersion" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnM1SysRowVersion" msprop:Generator_ColumnPropNameInRow="M1SysRowVersion" msprop:Generator_ColumnPropNameInTable="M1SysRowVersionColumn" msprop:Generator_UserColumnName="M1SysRowVersion" type="xs:base64Binary" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="FACT_DETALHE_FACTURAS" msprop:Generator_TableClassName="FACT_DETALHE_FACTURASDataTable" msprop:Generator_TableVarName="tableFACT_DETALHE_FACTURAS" msprop:Generator_RowChangedName="FACT_DETALHE_FACTURASRowChanged" msprop:Generator_TablePropName="FACT_DETALHE_FACTURAS" msprop:Generator_RowDeletingName="FACT_DETALHE_FACTURASRowDeleting" msprop:Generator_RowChangingName="FACT_DETALHE_FACTURASRowChanging" msprop:Generator_RowEvHandlerName="FACT_DETALHE_FACTURASRowChangeEventHandler" msprop:Generator_RowDeletedName="FACT_DETALHE_FACTURASRowDeleted" msprop:Generator_RowClassName="FACT_DETALHE_FACTURASRow" msprop:Generator_UserTableName="FACT_DETALHE_FACTURAS" msprop:Generator_RowEvArgName="FACT_DETALHE_FACTURASRowChangeEvent">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Pk" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk" msprop:Generator_ColumnPropNameInRow="Pk" msprop:Generator_ColumnPropNameInTable="PkColumn" msprop:Generator_UserColumnName="Pk" type="xs:string" />
              <xs:element name="Pk_factura" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_factura" msprop:Generator_ColumnPropNameInRow="Pk_factura" msprop:Generator_ColumnPropNameInTable="Pk_facturaColumn" msprop:Generator_UserColumnName="Pk_factura" type="xs:string" />
              <xs:element name="Quantidade" msprop:Generator_ColumnVarNameInTable="columnQuantidade" msprop:Generator_ColumnPropNameInRow="Quantidade" msprop:Generator_ColumnPropNameInTable="QuantidadeColumn" msprop:Generator_UserColumnName="Quantidade" type="xs:decimal" minOccurs="0" />
              <xs:element name="Pk_acto_clinico" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_clinico" msprop:Generator_ColumnPropNameInRow="Pk_acto_clinico" msprop:Generator_ColumnPropNameInTable="Pk_acto_clinicoColumn" msprop:Generator_UserColumnName="Pk_acto_clinico" type="xs:string" minOccurs="0" />
              <xs:element name="codigo_acto_clinico" msprop:Generator_ColumnVarNameInTable="columncodigo_acto_clinico" msprop:Generator_ColumnPropNameInRow="codigo_acto_clinico" msprop:Generator_ColumnPropNameInTable="codigo_acto_clinicoColumn" msprop:Generator_UserColumnName="codigo_acto_clinico" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Nome_acto_clinico" msprop:Generator_ColumnVarNameInTable="columnNome_acto_clinico" msprop:Generator_ColumnPropNameInRow="Nome_acto_clinico" msprop:Generator_ColumnPropNameInTable="Nome_acto_clinicoColumn" msprop:Generator_UserColumnName="Nome_acto_clinico" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Valor" msprop:Generator_ColumnVarNameInTable="columnValor" msprop:Generator_ColumnPropNameInRow="Valor" msprop:Generator_ColumnPropNameInTable="ValorColumn" msprop:Generator_UserColumnName="Valor" type="xs:decimal" minOccurs="0" />
              <xs:element name="Percentagem_iva" msprop:Generator_ColumnVarNameInTable="columnPercentagem_iva" msprop:Generator_ColumnPropNameInRow="Percentagem_iva" msprop:Generator_ColumnPropNameInTable="Percentagem_ivaColumn" msprop:Generator_UserColumnName="Percentagem_iva" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="Percentagem_desconto" msprop:Generator_ColumnVarNameInTable="columnPercentagem_desconto" msprop:Generator_ColumnPropNameInRow="Percentagem_desconto" msprop:Generator_ColumnPropNameInTable="Percentagem_descontoColumn" msprop:Generator_UserColumnName="Percentagem_desconto" type="xs:decimal" minOccurs="0" />
              <xs:element name="Total_K" msprop:Generator_ColumnVarNameInTable="columnTotal_K" msprop:Generator_ColumnPropNameInRow="Total_K" msprop:Generator_ColumnPropNameInTable="Total_KColumn" msprop:Generator_UserColumnName="Total_K" type="xs:decimal" minOccurs="0" />
              <xs:element name="Total_moeda" msprop:Generator_ColumnVarNameInTable="columnTotal_moeda" msprop:Generator_ColumnPropNameInRow="Total_moeda" msprop:Generator_ColumnPropNameInTable="Total_moedaColumn" msprop:Generator_UserColumnName="Total_moeda" type="xs:decimal" minOccurs="0" />
              <xs:element name="Pk_executante" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_executante" msprop:Generator_ColumnPropNameInRow="Pk_executante" msprop:Generator_ColumnPropNameInTable="Pk_executanteColumn" msprop:Generator_UserColumnName="Pk_executante" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_Centro_custos" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_Centro_custos" msprop:Generator_ColumnPropNameInRow="Pk_Centro_custos" msprop:Generator_ColumnPropNameInTable="Pk_Centro_custosColumn" msprop:Generator_UserColumnName="Pk_Centro_custos" type="xs:string" minOccurs="0" />
              <xs:element name="pk_utente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnpk_utente" msprop:Generator_ColumnPropNameInRow="pk_utente" msprop:Generator_ColumnPropNameInTable="pk_utenteColumn" msprop:Generator_UserColumnName="pk_utente" type="xs:string" minOccurs="0" />
              <xs:element name="np_utente" msprop:Generator_ColumnVarNameInTable="columnnp_utente" msprop:Generator_ColumnPropNameInRow="np_utente" msprop:Generator_ColumnPropNameInTable="np_utenteColumn" msprop:Generator_UserColumnName="np_utente" type="xs:long" minOccurs="0" />
              <xs:element name="nome_utente" msprop:Generator_ColumnVarNameInTable="columnnome_utente" msprop:Generator_ColumnPropNameInRow="nome_utente" msprop:Generator_ColumnPropNameInTable="nome_utenteColumn" msprop:Generator_UserColumnName="nome_utente" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_acto_clinico_utente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_clinico_utente" msprop:Generator_ColumnPropNameInRow="Pk_acto_clinico_utente" msprop:Generator_ColumnPropNameInTable="Pk_acto_clinico_utenteColumn" msprop:Generator_UserColumnName="Pk_acto_clinico_utente" type="xs:string" minOccurs="0" />
              <xs:element name="Num_beneficiario" msprop:Generator_ColumnVarNameInTable="columnNum_beneficiario" msprop:Generator_ColumnPropNameInRow="Num_beneficiario" msprop:Generator_ColumnPropNameInTable="Num_beneficiarioColumn" msprop:Generator_UserColumnName="Num_beneficiario" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pago" msprop:Generator_ColumnVarNameInTable="columnPago" msprop:Generator_ColumnPropNameInRow="Pago" msprop:Generator_ColumnPropNameInTable="PagoColumn" msprop:Generator_UserColumnName="Pago" type="xs:boolean" minOccurs="0" />
              <xs:element name="Num_documento_pagamento" msprop:Generator_ColumnVarNameInTable="columnNum_documento_pagamento" msprop:Generator_ColumnPropNameInRow="Num_documento_pagamento" msprop:Generator_ColumnPropNameInTable="Num_documento_pagamentoColumn" msprop:Generator_UserColumnName="Num_documento_pagamento" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="40" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="pk_detalhe_factura_dependente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnpk_detalhe_factura_dependente" msprop:Generator_ColumnPropNameInRow="pk_detalhe_factura_dependente" msprop:Generator_ColumnPropNameInTable="pk_detalhe_factura_dependenteColumn" msprop:Generator_UserColumnName="pk_detalhe_factura_dependente" type="xs:string" minOccurs="0" />
              <xs:element name="Data" msprop:Generator_ColumnVarNameInTable="columnData" msprop:Generator_ColumnPropNameInRow="Data" msprop:Generator_ColumnPropNameInTable="DataColumn" msprop:Generator_UserColumnName="Data" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Pk_consumo" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_consumo" msprop:Generator_ColumnPropNameInRow="Pk_consumo" msprop:Generator_ColumnPropNameInTable="Pk_consumoColumn" msprop:Generator_UserColumnName="Pk_consumo" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_produto" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_produto" msprop:Generator_ColumnPropNameInRow="Pk_produto" msprop:Generator_ColumnPropNameInTable="Pk_produtoColumn" msprop:Generator_UserColumnName="Pk_produto" type="xs:string" minOccurs="0" />
              <xs:element name="Agrupado_por_rubrica" msprop:Generator_ColumnVarNameInTable="columnAgrupado_por_rubrica" msprop:Generator_ColumnPropNameInRow="Agrupado_por_rubrica" msprop:Generator_ColumnPropNameInTable="Agrupado_por_rubricaColumn" msprop:Generator_UserColumnName="Agrupado_por_rubrica" type="xs:boolean" minOccurs="0" />
              <xs:element name="Pk_acto_clinico_para_facturacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_clinico_para_facturacao" msprop:Generator_ColumnPropNameInRow="Pk_acto_clinico_para_facturacao" msprop:Generator_ColumnPropNameInTable="Pk_acto_clinico_para_facturacaoColumn" msprop:Generator_UserColumnName="Pk_acto_clinico_para_facturacao" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_armazem" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_armazem" msprop:Generator_ColumnPropNameInRow="Pk_armazem" msprop:Generator_ColumnPropNameInTable="Pk_armazemColumn" msprop:Generator_UserColumnName="Pk_armazem" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_recibo" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_recibo" msprop:Generator_ColumnPropNameInRow="Pk_recibo" msprop:Generator_ColumnPropNameInTable="Pk_reciboColumn" msprop:Generator_UserColumnName="Pk_recibo" type="xs:string" minOccurs="0" />
              <xs:element name="Ignorar" msprop:Generator_ColumnVarNameInTable="columnIgnorar" msprop:Generator_ColumnPropNameInRow="Ignorar" msprop:Generator_ColumnPropNameInTable="IgnorarColumn" msprop:Generator_UserColumnName="Ignorar" type="xs:boolean" minOccurs="0" />
              <xs:element name="Valor_iva" msprop:Generator_ColumnVarNameInTable="columnValor_iva" msprop:Generator_ColumnPropNameInRow="Valor_iva" msprop:Generator_ColumnPropNameInTable="Valor_ivaColumn" msprop:Generator_UserColumnName="Valor_iva" type="xs:decimal" minOccurs="0" />
              <xs:element name="Preco_final_inclui_iva" msprop:Generator_ColumnVarNameInTable="columnPreco_final_inclui_iva" msprop:Generator_ColumnPropNameInRow="Preco_final_inclui_iva" msprop:Generator_ColumnPropNameInTable="Preco_final_inclui_ivaColumn" msprop:Generator_UserColumnName="Preco_final_inclui_iva" type="xs:boolean" minOccurs="0" />
              <xs:element name="Pk_detalhe_pai" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_detalhe_pai" msprop:Generator_ColumnPropNameInRow="Pk_detalhe_pai" msprop:Generator_ColumnPropNameInTable="Pk_detalhe_paiColumn" msprop:Generator_UserColumnName="Pk_detalhe_pai" type="xs:string" minOccurs="0" />
              <xs:element name="Percentagem_valor_no_total_detalhe" msprop:Generator_ColumnVarNameInTable="columnPercentagem_valor_no_total_detalhe" msprop:Generator_ColumnPropNameInRow="Percentagem_valor_no_total_detalhe" msprop:Generator_ColumnPropNameInTable="Percentagem_valor_no_total_detalheColumn" msprop:Generator_UserColumnName="Percentagem_valor_no_total_detalhe" type="xs:decimal" minOccurs="0" />
              <xs:element name="Transaccao" msprop:Generator_ColumnVarNameInTable="columnTransaccao" msprop:Generator_ColumnPropNameInRow="Transaccao" msprop:Generator_ColumnPropNameInTable="TransaccaoColumn" msprop:Generator_UserColumnName="Transaccao" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_plano_saude" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_plano_saude" msprop:Generator_ColumnPropNameInRow="Pk_plano_saude" msprop:Generator_ColumnPropNameInTable="Pk_plano_saudeColumn" msprop:Generator_UserColumnName="Pk_plano_saude" type="xs:string" minOccurs="0" />
              <xs:element name="Numero_cliente" msprop:Generator_ColumnVarNameInTable="columnNumero_cliente" msprop:Generator_ColumnPropNameInRow="Numero_cliente" msprop:Generator_ColumnPropNameInTable="Numero_clienteColumn" msprop:Generator_UserColumnName="Numero_cliente" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Codigo_contabilidade" msprop:Generator_ColumnVarNameInTable="columnCodigo_contabilidade" msprop:Generator_ColumnPropNameInRow="Codigo_contabilidade" msprop:Generator_ColumnPropNameInTable="Codigo_contabilidadeColumn" msprop:Generator_UserColumnName="Codigo_contabilidade" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Data_integracao_sistema_externo" msprop:Generator_ColumnVarNameInTable="columnData_integracao_sistema_externo" msprop:Generator_ColumnPropNameInRow="Data_integracao_sistema_externo" msprop:Generator_ColumnPropNameInTable="Data_integracao_sistema_externoColumn" msprop:Generator_UserColumnName="Data_integracao_sistema_externo" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Pk_acto_composto" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_composto" msprop:Generator_ColumnPropNameInRow="Pk_acto_composto" msprop:Generator_ColumnPropNameInTable="Pk_acto_compostoColumn" msprop:Generator_UserColumnName="Pk_acto_composto" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_marcacao_multipla" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_marcacao_multipla" msprop:Generator_ColumnPropNameInRow="Pk_marcacao_multipla" msprop:Generator_ColumnPropNameInTable="Pk_marcacao_multiplaColumn" msprop:Generator_UserColumnName="Pk_marcacao_multipla" type="xs:string" minOccurs="0" />
              <xs:element name="Num_extracto" msprop:Generator_ColumnVarNameInTable="columnNum_extracto" msprop:Generator_ColumnPropNameInRow="Num_extracto" msprop:Generator_ColumnPropNameInTable="Num_extractoColumn" msprop:Generator_UserColumnName="Num_extracto" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_local_realizacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_local_realizacao" msprop:Generator_ColumnPropNameInRow="Pk_local_realizacao" msprop:Generator_ColumnPropNameInTable="Pk_local_realizacaoColumn" msprop:Generator_UserColumnName="Pk_local_realizacao" type="xs:string" minOccurs="0" />
              <xs:element name="Data_ins" msprop:Generator_ColumnVarNameInTable="columnData_ins" msprop:Generator_ColumnPropNameInRow="Data_ins" msprop:Generator_ColumnPropNameInTable="Data_insColumn" msprop:Generator_UserColumnName="Data_ins" type="xs:dateTime" minOccurs="0" />
              <xs:element name="RowVersion" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnRowVersion" msprop:Generator_ColumnPropNameInRow="RowVersion" msprop:Generator_ColumnPropNameInTable="RowVersionColumn" msprop:Generator_UserColumnName="RowVersion" type="xs:base64Binary" minOccurs="0" />
              <xs:element name="Pk_consumo_para_facturacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_consumo_para_facturacao" msprop:Generator_ColumnPropNameInRow="Pk_consumo_para_facturacao" msprop:Generator_ColumnPropNameInTable="Pk_consumo_para_facturacaoColumn" msprop:Generator_UserColumnName="Pk_consumo_para_facturacao" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_detalhe_facturacao_adicional" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_detalhe_facturacao_adicional" msprop:Generator_ColumnPropNameInRow="Pk_detalhe_facturacao_adicional" msprop:Generator_ColumnPropNameInTable="Pk_detalhe_facturacao_adicionalColumn" msprop:Generator_UserColumnName="Pk_detalhe_facturacao_adicional" type="xs:string" minOccurs="0" />
              <xs:element name="Acto_facturacao_adicional" msprop:Generator_ColumnVarNameInTable="columnActo_facturacao_adicional" msprop:Generator_ColumnPropNameInRow="Acto_facturacao_adicional" msprop:Generator_ColumnPropNameInTable="Acto_facturacao_adicionalColumn" msprop:Generator_UserColumnName="Acto_facturacao_adicional" type="xs:boolean" minOccurs="0" />
              <xs:element name="Pk_iva" msprop:Generator_ColumnVarNameInTable="columnPk_iva" msprop:Generator_ColumnPropNameInRow="Pk_iva" msprop:Generator_ColumnPropNameInTable="Pk_ivaColumn" msprop:Generator_UserColumnName="Pk_iva" type="xs:int" minOccurs="0" />
              <xs:element name="Valor_text" msprop:Generator_ColumnVarNameInTable="columnValor_text" msprop:Generator_ColumnPropNameInRow="Valor_text" msprop:Generator_ColumnPropNameInTable="Valor_textColumn" msprop:Generator_UserColumnName="Valor_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Total_K_text" msprop:Generator_ColumnVarNameInTable="columnTotal_K_text" msprop:Generator_ColumnPropNameInRow="Total_K_text" msprop:Generator_ColumnPropNameInTable="Total_K_textColumn" msprop:Generator_UserColumnName="Total_K_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Total_moeda_text" msprop:Generator_ColumnVarNameInTable="columnTotal_moeda_text" msprop:Generator_ColumnPropNameInRow="Total_moeda_text" msprop:Generator_ColumnPropNameInTable="Total_moeda_textColumn" msprop:Generator_UserColumnName="Total_moeda_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Percentagem_valor_no_total_detalhe_text" msprop:Generator_ColumnVarNameInTable="columnPercentagem_valor_no_total_detalhe_text" msprop:Generator_ColumnPropNameInRow="Percentagem_valor_no_total_detalhe_text" msprop:Generator_ColumnPropNameInTable="Percentagem_valor_no_total_detalhe_textColumn" msprop:Generator_UserColumnName="Percentagem_valor_no_total_detalhe_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Valor_inclui_iva_usa_definicao_instalacao" msprop:Generator_ColumnVarNameInTable="columnValor_inclui_iva_usa_definicao_instalacao" msprop:Generator_ColumnPropNameInRow="Valor_inclui_iva_usa_definicao_instalacao" msprop:Generator_ColumnPropNameInTable="Valor_inclui_iva_usa_definicao_instalacaoColumn" msprop:Generator_UserColumnName="Valor_inclui_iva_usa_definicao_instalacao" type="xs:boolean" minOccurs="0" />
              <xs:element name="Valor_Precos_actos_produtos_incluem_iva" msprop:Generator_ColumnVarNameInTable="columnValor_Precos_actos_produtos_incluem_iva" msprop:Generator_ColumnPropNameInRow="Valor_Precos_actos_produtos_incluem_iva" msprop:Generator_ColumnPropNameInTable="Valor_Precos_actos_produtos_incluem_ivaColumn" msprop:Generator_UserColumnName="Valor_Precos_actos_produtos_incluem_iva" type="xs:boolean" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="FACT_DETALHE_FACTURAS_AUXILIAR" msprop:Generator_TableClassName="FACT_DETALHE_FACTURAS_AUXILIARDataTable" msprop:Generator_TableVarName="tableFACT_DETALHE_FACTURAS_AUXILIAR" msprop:Generator_RowChangedName="FACT_DETALHE_FACTURAS_AUXILIARRowChanged" msprop:Generator_TablePropName="FACT_DETALHE_FACTURAS_AUXILIAR" msprop:Generator_RowDeletingName="FACT_DETALHE_FACTURAS_AUXILIARRowDeleting" msprop:Generator_RowChangingName="FACT_DETALHE_FACTURAS_AUXILIARRowChanging" msprop:Generator_RowEvHandlerName="FACT_DETALHE_FACTURAS_AUXILIARRowChangeEventHandler" msprop:Generator_RowDeletedName="FACT_DETALHE_FACTURAS_AUXILIARRowDeleted" msprop:Generator_RowClassName="FACT_DETALHE_FACTURAS_AUXILIARRow" msprop:Generator_UserTableName="FACT_DETALHE_FACTURAS_AUXILIAR" msprop:Generator_RowEvArgName="FACT_DETALHE_FACTURAS_AUXILIARRowChangeEvent">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Pk" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk" msprop:Generator_ColumnPropNameInRow="Pk" msprop:Generator_ColumnPropNameInTable="PkColumn" msprop:Generator_UserColumnName="Pk" type="xs:string" />
              <xs:element name="Pk_factura" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_factura" msprop:Generator_ColumnPropNameInRow="Pk_factura" msprop:Generator_ColumnPropNameInTable="Pk_facturaColumn" msprop:Generator_UserColumnName="Pk_factura" type="xs:string" />
              <xs:element name="Quantidade" msprop:Generator_ColumnVarNameInTable="columnQuantidade" msprop:Generator_ColumnPropNameInRow="Quantidade" msprop:Generator_ColumnPropNameInTable="QuantidadeColumn" msprop:Generator_UserColumnName="Quantidade" type="xs:decimal" minOccurs="0" />
              <xs:element name="Pk_acto_clinico" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_clinico" msprop:Generator_ColumnPropNameInRow="Pk_acto_clinico" msprop:Generator_ColumnPropNameInTable="Pk_acto_clinicoColumn" msprop:Generator_UserColumnName="Pk_acto_clinico" type="xs:string" minOccurs="0" />
              <xs:element name="codigo_acto_clinico" msprop:Generator_ColumnVarNameInTable="columncodigo_acto_clinico" msprop:Generator_ColumnPropNameInRow="codigo_acto_clinico" msprop:Generator_ColumnPropNameInTable="codigo_acto_clinicoColumn" msprop:Generator_UserColumnName="codigo_acto_clinico" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Nome_acto_clinico" msprop:Generator_ColumnVarNameInTable="columnNome_acto_clinico" msprop:Generator_ColumnPropNameInRow="Nome_acto_clinico" msprop:Generator_ColumnPropNameInTable="Nome_acto_clinicoColumn" msprop:Generator_UserColumnName="Nome_acto_clinico" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Valor" msprop:Generator_ColumnVarNameInTable="columnValor" msprop:Generator_ColumnPropNameInRow="Valor" msprop:Generator_ColumnPropNameInTable="ValorColumn" msprop:Generator_UserColumnName="Valor" type="xs:decimal" minOccurs="0" />
              <xs:element name="Percentagem_iva" msprop:Generator_ColumnVarNameInTable="columnPercentagem_iva" msprop:Generator_ColumnPropNameInRow="Percentagem_iva" msprop:Generator_ColumnPropNameInTable="Percentagem_ivaColumn" msprop:Generator_UserColumnName="Percentagem_iva" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="Percentagem_desconto" msprop:Generator_ColumnVarNameInTable="columnPercentagem_desconto" msprop:Generator_ColumnPropNameInRow="Percentagem_desconto" msprop:Generator_ColumnPropNameInTable="Percentagem_descontoColumn" msprop:Generator_UserColumnName="Percentagem_desconto" type="xs:decimal" minOccurs="0" />
              <xs:element name="Total_K" msprop:Generator_ColumnVarNameInTable="columnTotal_K" msprop:Generator_ColumnPropNameInRow="Total_K" msprop:Generator_ColumnPropNameInTable="Total_KColumn" msprop:Generator_UserColumnName="Total_K" type="xs:decimal" minOccurs="0" />
              <xs:element name="Total_moeda" msprop:Generator_ColumnVarNameInTable="columnTotal_moeda" msprop:Generator_ColumnPropNameInRow="Total_moeda" msprop:Generator_ColumnPropNameInTable="Total_moedaColumn" msprop:Generator_UserColumnName="Total_moeda" type="xs:decimal" minOccurs="0" />
              <xs:element name="Pk_executante" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_executante" msprop:Generator_ColumnPropNameInRow="Pk_executante" msprop:Generator_ColumnPropNameInTable="Pk_executanteColumn" msprop:Generator_UserColumnName="Pk_executante" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_Centro_custos" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_Centro_custos" msprop:Generator_ColumnPropNameInRow="Pk_Centro_custos" msprop:Generator_ColumnPropNameInTable="Pk_Centro_custosColumn" msprop:Generator_UserColumnName="Pk_Centro_custos" type="xs:string" minOccurs="0" />
              <xs:element name="pk_utente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnpk_utente" msprop:Generator_ColumnPropNameInRow="pk_utente" msprop:Generator_ColumnPropNameInTable="pk_utenteColumn" msprop:Generator_UserColumnName="pk_utente" type="xs:string" minOccurs="0" />
              <xs:element name="np_utente" msprop:Generator_ColumnVarNameInTable="columnnp_utente" msprop:Generator_ColumnPropNameInRow="np_utente" msprop:Generator_ColumnPropNameInTable="np_utenteColumn" msprop:Generator_UserColumnName="np_utente" type="xs:long" minOccurs="0" />
              <xs:element name="nome_utente" msprop:Generator_ColumnVarNameInTable="columnnome_utente" msprop:Generator_ColumnPropNameInRow="nome_utente" msprop:Generator_ColumnPropNameInTable="nome_utenteColumn" msprop:Generator_UserColumnName="nome_utente" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_acto_clinico_utente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_clinico_utente" msprop:Generator_ColumnPropNameInRow="Pk_acto_clinico_utente" msprop:Generator_ColumnPropNameInTable="Pk_acto_clinico_utenteColumn" msprop:Generator_UserColumnName="Pk_acto_clinico_utente" type="xs:string" minOccurs="0" />
              <xs:element name="Num_beneficiario" msprop:Generator_ColumnVarNameInTable="columnNum_beneficiario" msprop:Generator_ColumnPropNameInRow="Num_beneficiario" msprop:Generator_ColumnPropNameInTable="Num_beneficiarioColumn" msprop:Generator_UserColumnName="Num_beneficiario" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pago" msprop:Generator_ColumnVarNameInTable="columnPago" msprop:Generator_ColumnPropNameInRow="Pago" msprop:Generator_ColumnPropNameInTable="PagoColumn" msprop:Generator_UserColumnName="Pago" type="xs:boolean" minOccurs="0" />
              <xs:element name="Num_documento_pagamento" msprop:Generator_ColumnVarNameInTable="columnNum_documento_pagamento" msprop:Generator_ColumnPropNameInRow="Num_documento_pagamento" msprop:Generator_ColumnPropNameInTable="Num_documento_pagamentoColumn" msprop:Generator_UserColumnName="Num_documento_pagamento" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="40" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="pk_detalhe_factura_dependente" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnpk_detalhe_factura_dependente" msprop:Generator_ColumnPropNameInRow="pk_detalhe_factura_dependente" msprop:Generator_ColumnPropNameInTable="pk_detalhe_factura_dependenteColumn" msprop:Generator_UserColumnName="pk_detalhe_factura_dependente" type="xs:string" minOccurs="0" />
              <xs:element name="Data" msprop:Generator_ColumnVarNameInTable="columnData" msprop:Generator_ColumnPropNameInRow="Data" msprop:Generator_ColumnPropNameInTable="DataColumn" msprop:Generator_UserColumnName="Data" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Pk_consumo" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_consumo" msprop:Generator_ColumnPropNameInRow="Pk_consumo" msprop:Generator_ColumnPropNameInTable="Pk_consumoColumn" msprop:Generator_UserColumnName="Pk_consumo" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_produto" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_produto" msprop:Generator_ColumnPropNameInRow="Pk_produto" msprop:Generator_ColumnPropNameInTable="Pk_produtoColumn" msprop:Generator_UserColumnName="Pk_produto" type="xs:string" minOccurs="0" />
              <xs:element name="Agrupado_por_rubrica" msprop:Generator_ColumnVarNameInTable="columnAgrupado_por_rubrica" msprop:Generator_ColumnPropNameInRow="Agrupado_por_rubrica" msprop:Generator_ColumnPropNameInTable="Agrupado_por_rubricaColumn" msprop:Generator_UserColumnName="Agrupado_por_rubrica" type="xs:boolean" minOccurs="0" />
              <xs:element name="Pk_acto_clinico_para_facturacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_clinico_para_facturacao" msprop:Generator_ColumnPropNameInRow="Pk_acto_clinico_para_facturacao" msprop:Generator_ColumnPropNameInTable="Pk_acto_clinico_para_facturacaoColumn" msprop:Generator_UserColumnName="Pk_acto_clinico_para_facturacao" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_armazem" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_armazem" msprop:Generator_ColumnPropNameInRow="Pk_armazem" msprop:Generator_ColumnPropNameInTable="Pk_armazemColumn" msprop:Generator_UserColumnName="Pk_armazem" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_recibo" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_recibo" msprop:Generator_ColumnPropNameInRow="Pk_recibo" msprop:Generator_ColumnPropNameInTable="Pk_reciboColumn" msprop:Generator_UserColumnName="Pk_recibo" type="xs:string" minOccurs="0" />
              <xs:element name="Ignorar" msprop:Generator_ColumnVarNameInTable="columnIgnorar" msprop:Generator_ColumnPropNameInRow="Ignorar" msprop:Generator_ColumnPropNameInTable="IgnorarColumn" msprop:Generator_UserColumnName="Ignorar" type="xs:boolean" minOccurs="0" />
              <xs:element name="Preco_final_inclui_iva" msprop:Generator_ColumnVarNameInTable="columnPreco_final_inclui_iva" msprop:Generator_ColumnPropNameInRow="Preco_final_inclui_iva" msprop:Generator_ColumnPropNameInTable="Preco_final_inclui_ivaColumn" msprop:Generator_UserColumnName="Preco_final_inclui_iva" type="xs:boolean" minOccurs="0" />
              <xs:element name="Valor_iva" msprop:Generator_ColumnVarNameInTable="columnValor_iva" msprop:Generator_ColumnPropNameInRow="Valor_iva" msprop:Generator_ColumnPropNameInTable="Valor_ivaColumn" msprop:Generator_UserColumnName="Valor_iva" type="xs:decimal" minOccurs="0" />
              <xs:element name="Pk_detalhe_pai" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_detalhe_pai" msprop:Generator_ColumnPropNameInRow="Pk_detalhe_pai" msprop:Generator_ColumnPropNameInTable="Pk_detalhe_paiColumn" msprop:Generator_UserColumnName="Pk_detalhe_pai" type="xs:string" minOccurs="0" />
              <xs:element name="Percentagem_valor_no_total_detalhe" msprop:Generator_ColumnVarNameInTable="columnPercentagem_valor_no_total_detalhe" msprop:Generator_ColumnPropNameInRow="Percentagem_valor_no_total_detalhe" msprop:Generator_ColumnPropNameInTable="Percentagem_valor_no_total_detalheColumn" msprop:Generator_UserColumnName="Percentagem_valor_no_total_detalhe" type="xs:decimal" minOccurs="0" />
              <xs:element name="Transaccao" msprop:Generator_ColumnVarNameInTable="columnTransaccao" msprop:Generator_ColumnPropNameInRow="Transaccao" msprop:Generator_ColumnPropNameInTable="TransaccaoColumn" msprop:Generator_UserColumnName="Transaccao" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_plano_saude" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_plano_saude" msprop:Generator_ColumnPropNameInRow="Pk_plano_saude" msprop:Generator_ColumnPropNameInTable="Pk_plano_saudeColumn" msprop:Generator_UserColumnName="Pk_plano_saude" type="xs:string" minOccurs="0" />
              <xs:element name="Numero_cliente" msprop:Generator_ColumnVarNameInTable="columnNumero_cliente" msprop:Generator_ColumnPropNameInRow="Numero_cliente" msprop:Generator_ColumnPropNameInTable="Numero_clienteColumn" msprop:Generator_UserColumnName="Numero_cliente" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Codigo_contabilidade" msprop:Generator_ColumnVarNameInTable="columnCodigo_contabilidade" msprop:Generator_ColumnPropNameInRow="Codigo_contabilidade" msprop:Generator_ColumnPropNameInTable="Codigo_contabilidadeColumn" msprop:Generator_UserColumnName="Codigo_contabilidade" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Data_integracao_sistema_externo" msprop:Generator_ColumnVarNameInTable="columnData_integracao_sistema_externo" msprop:Generator_ColumnPropNameInRow="Data_integracao_sistema_externo" msprop:Generator_ColumnPropNameInTable="Data_integracao_sistema_externoColumn" msprop:Generator_UserColumnName="Data_integracao_sistema_externo" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Pk_acto_composto" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_acto_composto" msprop:Generator_ColumnPropNameInRow="Pk_acto_composto" msprop:Generator_ColumnPropNameInTable="Pk_acto_compostoColumn" msprop:Generator_UserColumnName="Pk_acto_composto" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_marcacao_multipla" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_marcacao_multipla" msprop:Generator_ColumnPropNameInRow="Pk_marcacao_multipla" msprop:Generator_ColumnPropNameInTable="Pk_marcacao_multiplaColumn" msprop:Generator_UserColumnName="Pk_marcacao_multipla" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_fact_detalhe_facturas_agrupador" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_fact_detalhe_facturas_agrupador" msprop:Generator_ColumnPropNameInRow="Pk_fact_detalhe_facturas_agrupador" msprop:Generator_ColumnPropNameInTable="Pk_fact_detalhe_facturas_agrupadorColumn" msprop:Generator_UserColumnName="Pk_fact_detalhe_facturas_agrupador" type="xs:string" minOccurs="0" />
              <xs:element name="Valor_agrupador_depende_componentes" msprop:Generator_ColumnVarNameInTable="columnValor_agrupador_depende_componentes" msprop:Generator_ColumnPropNameInRow="Valor_agrupador_depende_componentes" msprop:Generator_ColumnPropNameInTable="Valor_agrupador_depende_componentesColumn" msprop:Generator_UserColumnName="Valor_agrupador_depende_componentes" type="xs:boolean" minOccurs="0" />
              <xs:element name="Num_extracto" msprop:Generator_ColumnVarNameInTable="columnNum_extracto" msprop:Generator_ColumnPropNameInRow="Num_extracto" msprop:Generator_ColumnPropNameInTable="Num_extractoColumn" msprop:Generator_UserColumnName="Num_extracto" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pk_local_realizacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_local_realizacao" msprop:Generator_ColumnPropNameInRow="Pk_local_realizacao" msprop:Generator_ColumnPropNameInTable="Pk_local_realizacaoColumn" msprop:Generator_UserColumnName="Pk_local_realizacao" type="xs:string" minOccurs="0" />
              <xs:element name="Data_ins" msprop:Generator_ColumnVarNameInTable="columnData_ins" msprop:Generator_ColumnPropNameInRow="Data_ins" msprop:Generator_ColumnPropNameInTable="Data_insColumn" msprop:Generator_UserColumnName="Data_ins" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Pk_consumo_para_facturacao" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_consumo_para_facturacao" msprop:Generator_ColumnPropNameInRow="Pk_consumo_para_facturacao" msprop:Generator_ColumnPropNameInTable="Pk_consumo_para_facturacaoColumn" msprop:Generator_UserColumnName="Pk_consumo_para_facturacao" type="xs:string" minOccurs="0" />
              <xs:element name="Pk_detalhe_facturacao_adicional" msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_ColumnVarNameInTable="columnPk_detalhe_facturacao_adicional" msprop:Generator_ColumnPropNameInRow="Pk_detalhe_facturacao_adicional" msprop:Generator_ColumnPropNameInTable="Pk_detalhe_facturacao_adicionalColumn" msprop:Generator_UserColumnName="Pk_detalhe_facturacao_adicional" type="xs:string" minOccurs="0" />
              <xs:element name="Acto_facturacao_adicional" msprop:Generator_ColumnVarNameInTable="columnActo_facturacao_adicional" msprop:Generator_ColumnPropNameInRow="Acto_facturacao_adicional" msprop:Generator_ColumnPropNameInTable="Acto_facturacao_adicionalColumn" msprop:Generator_UserColumnName="Acto_facturacao_adicional" type="xs:boolean" minOccurs="0" />
              <xs:element name="Pk_iva" msprop:Generator_ColumnVarNameInTable="columnPk_iva" msprop:Generator_ColumnPropNameInRow="Pk_iva" msprop:Generator_ColumnPropNameInTable="Pk_ivaColumn" msprop:Generator_UserColumnName="Pk_iva" type="xs:int" minOccurs="0" />
              <xs:element name="Valor_inclui_iva_usa_definicao_instalacao" msprop:Generator_ColumnVarNameInTable="columnValor_inclui_iva_usa_definicao_instalacao" msprop:Generator_ColumnPropNameInRow="Valor_inclui_iva_usa_definicao_instalacao" msprop:Generator_ColumnPropNameInTable="Valor_inclui_iva_usa_definicao_instalacaoColumn" msprop:Generator_UserColumnName="Valor_inclui_iva_usa_definicao_instalacao" type="xs:boolean" minOccurs="0" />
              <xs:element name="Valor_Precos_actos_produtos_incluem_iva" msprop:Generator_ColumnVarNameInTable="columnValor_Precos_actos_produtos_incluem_iva" msprop:Generator_ColumnPropNameInRow="Valor_Precos_actos_produtos_incluem_iva" msprop:Generator_ColumnPropNameInTable="Valor_Precos_actos_produtos_incluem_ivaColumn" msprop:Generator_UserColumnName="Valor_Precos_actos_produtos_incluem_iva" type="xs:boolean" minOccurs="0" />
              <xs:element name="Valor_text" msprop:Generator_ColumnVarNameInTable="columnValor_text" msprop:Generator_ColumnPropNameInRow="Valor_text" msprop:Generator_ColumnPropNameInTable="Valor_textColumn" msprop:Generator_UserColumnName="Valor_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Total_K_text" msprop:Generator_ColumnVarNameInTable="columnTotal_K_text" msprop:Generator_ColumnPropNameInRow="Total_K_text" msprop:Generator_ColumnPropNameInTable="Total_K_textColumn" msprop:Generator_UserColumnName="Total_K_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Total_moeda_text" msprop:Generator_ColumnVarNameInTable="columnTotal_moeda_text" msprop:Generator_ColumnPropNameInRow="Total_moeda_text" msprop:Generator_ColumnPropNameInTable="Total_moeda_textColumn" msprop:Generator_UserColumnName="Total_moeda_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Valor_iva_text" msprop:Generator_ColumnVarNameInTable="columnValor_iva_text" msprop:Generator_ColumnPropNameInRow="Valor_iva_text" msprop:Generator_ColumnPropNameInTable="Valor_iva_textColumn" msprop:Generator_UserColumnName="Valor_iva_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Percentagem_desconto_text" msprop:Generator_ColumnVarNameInTable="columnPercentagem_desconto_text" msprop:Generator_ColumnPropNameInRow="Percentagem_desconto_text" msprop:Generator_ColumnPropNameInTable="Percentagem_desconto_textColumn" msprop:Generator_UserColumnName="Percentagem_desconto_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Percentagem_valor_no_total_detalhe_text" msprop:Generator_ColumnVarNameInTable="columnPercentagem_valor_no_total_detalhe_text" msprop:Generator_ColumnPropNameInRow="Percentagem_valor_no_total_detalhe_text" msprop:Generator_ColumnPropNameInTable="Percentagem_valor_no_total_detalhe_textColumn" msprop:Generator_UserColumnName="Percentagem_valor_no_total_detalhe_text" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:FACT_FACTURAS" />
      <xs:field xpath="mstns:Pk" />
    </xs:unique>
    <xs:unique name="FACT_DETALHE_FACTURAS_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:FACT_DETALHE_FACTURAS" />
      <xs:field xpath="mstns:Pk" />
    </xs:unique>
  </xs:element>
  <xs:annotation>
    <xs:appinfo>
      <msdata:Relationship name="FK_FACT_DETALHE_FACTURAS_FACT_FACTURAS" msdata:parent="FACT_FACTURAS" msdata:child="FACT_DETALHE_FACTURAS" msdata:parentkey="Pk" msdata:childkey="Pk_factura" msprop:Generator_UserChildTable="FACT_DETALHE_FACTURAS" msprop:Generator_ChildPropName="GetFACT_DETALHE_FACTURASRows" msprop:Generator_UserRelationName="FK_FACT_DETALHE_FACTURAS_FACT_FACTURAS" msprop:Generator_ParentPropName="FACT_FACTURASRow" msprop:Generator_RelationVarName="relationFK_FACT_DETALHE_FACTURAS_FACT_FACTURAS" msprop:Generator_UserParentTable="FACT_FACTURAS" />
    </xs:appinfo>
  </xs:annotation>
</xs:schema>